Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building & running jpagelyzer from source #11

Open
keheliya opened this issue Mar 25, 2014 · 4 comments
Open

Building & running jpagelyzer from source #11

keheliya opened this issue Mar 25, 2014 · 4 comments

Comments

@keheliya
Copy link

Due to the error I mentioned here in #10, I tried running the maven version from source. After modifying the paths to resources I tried running pagelyzer/Maven/Pagelyzer/src/test/java/Test.java and getting the following error.

Selenium: local WebDriver
Setting up browser: firefox
Attempt = 1
Setting up browser: firefox
Attempt = 1
getting data using driver: firefox
title: Accueil LIP6
getting data using driver: firefox
ERROR: Could not load -url2
Trying to reinitialize browser
org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
Command duration or timeout: 45.03 seconds
Build info: version: '2.40.0', revision: '4c5c0568b004f67810ee41c459549aa4b09c651e', time: '2014-02-19 11:13:01'
System info: host: 'xxxxxxxxxx', ip: 'xxxxxx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.2', java.version: '1.7.0_45'
Session ID: 3274e525-257a-0146-b9a4-ba50375461ce
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=27.0.1}]
Attempt = 1
Exception in thread "main" java.lang.NullPointerException
    at pagelyzer.JPagelyzer.changeDetection(JPagelyzer.java:215)
    at Test.main(Test.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) 

I can see one empty browser window and one with http://www.lip6.fr/ have been triggered. Am I missing something?

Thanks

@ZeynepP
Copy link

ZeynepP commented Mar 26, 2014

Did you debug ? what is null? capture or capture.vi-xml?
Reminder: You should build all the projects separetly JDescriptor -> JKernel.. -> Marcalizer -> Pagelyzer.

@ZeynepP
Copy link

ZeynepP commented Mar 26, 2014

is everything ok when you do Maven Install for each project?

@keheliya
Copy link
Author

Hi @ZeynepP
Thanks for looking into this. If you look closely, there's another error beofre the Null pointer: org.openqa.selenium.WebDriverException: f.QueryInterface is not a function

So I put a e.printStackTrace();, here to get the full error. See the full stack trace now:


Selenium: local WebDriver
Setting up browser: firefox
Attempt = 1
Setting up browser: firefox
Attempt = 1
getting data using driver: firefox
title: Accueil LIP6
getting data using driver: firefox
ERROR: Could not load -url2
Trying to reinitialize browser
org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
Command duration or timeout: 45.07 seconds
Build info: version: '2.40.0', revision: '4c5c0568b004f67810ee41c459549aa4b09c651e', time: '2014-02-19 11:13:01'
System info: host: 'xxxxxxxxx', ip: 'xxxxxxxxx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.2', java.version: '1.7.0_45'
Session ID: f6dc0fd9-3e12-fd4a-9979-e2c5e1499a7c
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=27.0.1}]
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
  at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
  at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
  at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:573)
  at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:278)
  at pagelyzer.Capture.process(Capture.java:225)
  at pagelyzer.Capture.run(Capture.java:302)
  at pagelyzer.JPagelyzer.changeDetection(JPagelyzer.java:214)
  at Test.main(Test.java:41)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: f.QueryInterface is not a function
Build info: version: '2.40.0', revision: '4c5c0568b004f67810ee41c459549aa4b09c651e', time: '2014-02-19 11:13:01'
System info: host: 'xxxxxxxxx', ip: 'xxxxxxxxx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.2', java.version: '1.7.0_45'
Driver info: driver.version: unknown
  at <anonymous class>.FirefoxDriver.prototype.get(file:///var/folders/9f/6kv1wj1j5pdgtl21ntj_jcf00000gp/T/anonymous4464757058529100098webdriver-profile/extensions/[email protected]/components/driver_component.js:8767)
  at <anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///var/folders/9f/6kv1wj1j5pdgtl21ntj_jcf00000gp/T/anonymous4464757058529100098webdriver-profile/extensions/[email protected]/components/command_processor.js:10878)
  at <anonymous class>.fxdriver.Timer.prototype.setTimeout/<.notify(file:///var/folders/9f/6kv1wj1j5pdgtl21ntj_jcf00000gp/T/anonymous4464757058529100098webdriver-profile/extensions/[email protected]/components/command_processor.js:396)
org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
Command duration or timeout: 45.07 seconds
Build info: version: '2.40.0', revision: '4c5c0568b004f67810ee41c459549aa4b09c651e', time: '2014-02-19 11:13:01'
System info: host: 'xxxxxxxxx', ip: 'xxxxxxxxx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.2', java.version: '1.7.0_45'
Session ID: f6dc0fd9-3e12-fd4a-9979-e2c5e1499a7c
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=27.0.1}]
Attempt = 1
Exception in thread "main" java.lang.NullPointerException
  at pagelyzer.JPagelyzer.changeDetection(JPagelyzer.java:215)
  at Test.main(Test.java:41)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

@keheliya
Copy link
Author

And yes. I built the each project separately in the above order. BTW I think you can automate it by having a parent prom and all of these as modules. For example like..

<modules>
        <module>JDescriptor</module>
        <module>JKernel</module>
        <module>Marcalizer</module>
        <module>Pagelyzer</module>
</modules>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants