I'm trying to update my Java test suite to use Selenium 3 and geckodriver. However, I see this very strange behavior on executing the test command:
- Firefox opens up to a blank page.
- It stays like this for about 2 minutes.
- It closes and then immediately restarts.
- The test runs and passes.
I use Selenium 3.0.1, geckodriver 0.11.1, Firefox 50.0 on 64-bit Linux.
I obtain FirefoxDriver like this:
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
return new FirefoxDriver(capabilities);
I'm setting the system property webdriver.gecko.driver
in my Maven conf:
<webdriver.gecko.driver>
${basedir}/src/test/resources/geckodriver
</webdriver.gecko.driver>
What could I be missing? Many thanks for any help!
Console logs for my tests (with three distinct timing groups):
around 3:54:30 PM
Full log: http://ift.tt/2gjXIs6
Key snippets:
Configuring TestNG with: TestNG652Configurator
[VerboseTestNG] RUNNING: Suite: "Surefire test" containing "1" Tests (config: null)
[VerboseTestNG] INVOKING CONFIGURATION: "Surefire test" - @BeforeClass com.example.MyTest.classSetUp()
[VerboseTestNG] PASSED CONFIGURATION: "Surefire test" - @BeforeClass com.example.MyTest.classSetUp() finished in 384 ms
[VerboseTestNG] INVOKING CONFIGURATION: "Surefire test" - @BeforeMethod com.example.MyTest.methodSetUp()
1479999268209 geckodriver INFO Listening on 127.0.0.1:7263
Nov 24, 2016 3:54:28 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
1479999268435 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.VYFzbHfCS7iH
1479999268438 geckodriver::marionette INFO Starting browser /usr/bin/firefox
1479999268441 geckodriver::marionette INFO Connecting to Marionette on localhost:56753
(firefox:2956): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed
(firefox:2956): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
(firefox:2956): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed
(firefox:2956): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
[...]
1479999269312 addons.manager DEBUG Completed startup sequence
1479999269598 Marionette INFO Listening on port 56753
1479999270046 addons.manager DEBUG Starting provider: <unnamed-provider>
1479999270046 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1479999270048 addons.manager DEBUG Provider finished startup: <unnamed-provider>
1479999270094 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1479999270094 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1479999270095 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
1479999270100 DeferredSave.extensions.json DEBUG Starting write
1479999270286 DeferredSave.extensions.json DEBUG Write succeeded
1479999270288 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 17
(/usr/lib/firefox/plugin-container:3019): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed
(/usr/lib/firefox/plugin-container:3019): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
(/usr/lib/firefox/plugin-container:3019): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed
(/usr/lib/firefox/plugin-container:3019): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
around 3:55:32 PM
Full log:
1479999331434 addons.productaddons INFO sending request to: http://ift.tt/2fbBTPw ubuntu/Linux%203.13.0-101-generic%20(GTK%203.10.8%2Clibpulse%204.0.0)/canonical/1.0/update.xml
1479999332144 addons.productaddons INFO Completed downloading document
1479999332573 addons.productaddons INFO downloadXHR File download. status=200
1479999332581 addons.productaddons INFO Downloaded file will be saved to /tmp/tmpaddon
around 3:56:35 PM
Full log:
Nov 24, 2016 3:56:35 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[VerboseTestNG] PASSED CONFIGURATION: "Surefire test" - @BeforeMethod com.example.MyTest.methodSetUp() finished in 129531 ms
[VerboseTestNG] INVOKING: "Surefire test" - com.example.MyTest.testSomething()
[VerboseTestNG] PASSED: "Surefire test" - com.example.MyTest.testSomething() finished in 1603 ms
Aucun commentaire:
Enregistrer un commentaire