Hello,
I'm very beginner on the usage of Webdriver
On my office, i need to control my browser. I've maked a script with auto-click, it's work but can fail/have bug... Webdriver will help me a lot, because it's possible to control the browser.
I've tried the basic code to open a page, move to another URL and wait the end of loading, get the code source, and move to another page.
I was on Firefox 91 ESR and the basic script worked.
But now my company have make an update, and now we're on Firefox 102 ESR and now it's not working.
I must stay on my browser deployed by my company (so can't return on Firefox 91, or install chrome...)
The geckodriver send a "NS_BINDING_ABORTED".
I've not seeing in forums this bugs, so anyone got this and know how to resolve it ?
I've updated Webdriver UDF from old version and WinHTTP but it change nothing.
The geckodriver open Firefox, enter URL but at the millisecond on loading. Firefox is killed by gecko and send the error.
The geckodriver is the lastest version (v0.33). I've tried the 0.32.2 and 0.30 but nothing work.
The code in autoit used :
Local $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"browserName": "firefox"}}}'
_WD_Option('Driver', $g_sDriver)
_WD_Option('DriverParams', '--log trace')
_WD_Option('Port', 4444)
_WD_Startup()
If @error <> $_WD_ERROR_Success Then Exit -1
Local $sSession = _WD_CreateSession($sDesiredCapabilities)
If @error <> $_WD_ERROR_Success Then Exit
Local $g_sUrl = 'http://intranet:8091/6'
Local $sURL = "http://intranet:8091/6/nodes"
_WD_Navigate($sSession, $g_sUrl)
_WD_LoadWait($sSession,5000,15000)
$sourceCode = _WD_GetSource($sSession)
Sleep(2000)
_WD_Navigate($sSession, $sURL)
Sleep(2000)
_WD_Shutdown($g_sDriver)
The error in Autoit console :
_WD_Option ==> Success [0] : Parameters: Option=Driver Value=./dependances/geckodriver.exe
_WD_Option ==> Success [0] : Parameters: Option=DriverParams Value=--log trace
_WD_Option ==> Success [0] : Parameters: Option=Port Value=4444
_WD_GetFreePort ==> Success [0 / 4444] : Parameters: MinPort=4444 MaxPort=Default
_WD_IsLatestRelease ==> Success [0] : True
_WD_Startup: OS: WIN_10 X64 19045
_WD_Startup: AutoIt: 3.3.14.5
_WD_Startup: Webdriver UDF: 1.0.3 (Up to date)
_WD_Startup: WinHTTP: 1.6.4.2
_WD_Startup: Driver: ./dependances/geckodriver.exe (64 Bit)
_WD_Startup: Params: --log trace
_WD_Startup: Port: 4444
_WD_Startup: Command: "./dependances/geckodriver.exe" --log trace
_WD_Startup ==> Success [0]
__WD_Post ==> Session not created [15] : HTTP status = 500
_WD_CreateSession ==> Session not created [15] : Error: NS_BINDING_ABORTED
The error in GeckoDriver Trace :
1686237907055 geckodriver INFO Listening on 127.0.0.1:4444
1686237908875 webdriver::server DEBUG -> POST /session {"capabilities": {"alwaysMatch": {"browserName": "firefox"}}}
1686237908876 geckodriver::capabilities DEBUG Trying to read firefox version from ini files
1686237908882 geckodriver::capabilities DEBUG Found version 102.3
1686237908944 mozrunner::runner INFO Running command: "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe" "--marionette" "-no-remote" "-profile" "C:\\Users\\DINL~1\\AppData\\Local\\Temp\\rust_mozprofileBN4Xi6"
1686237908977 geckodriver::marionette DEBUG Waiting 60s to connect to browser on 127.0.0.1
1686237908978 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237908978 geckodriver::marionette TRACE Retrying in 100ms
1686237909081 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237909081 geckodriver::marionette TRACE Retrying in 100ms
1686237909188 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237909188 geckodriver::marionette TRACE Retrying in 100ms
1686237909297 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237909299 geckodriver::marionette TRACE Retrying in 100ms
1686237909404 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237909404 geckodriver::marionette TRACE Retrying in 100ms
1686237909512 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237909513 geckodriver::marionette TRACE Retrying in 100ms
1686237909620 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237909620 geckodriver::marionette TRACE Retrying in 100ms
1686237909725 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237909728 geckodriver::marionette TRACE Retrying in 100ms
1686237909833 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237909833 geckodriver::marionette TRACE Retrying in 100ms
1686237909942 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237909942 geckodriver::marionette TRACE Retrying in 100ms
1686237910050 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237910050 geckodriver::marionette TRACE Retrying in 100ms
1686237910159 geckodriver::browser TRACE Failed to open C:\Users\DINL~1\AppData\Local\Temp\rust_mozprofileBN4Xi6\MarionetteActivePort
1686237910159 geckodriver::marionette TRACE Retrying in 100ms
Read port: 64087
1686237910361 geckodriver::marionette DEBUG Connection to Marionette established on 127.0.0.1:64087.
1686237913158 webdriver::server DEBUG Teardown session
1686237913172 mozrunner::runner DEBUG Killing process 12440
1686237913197 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"session not created","message":"Error: NS_BINDING_ABORTED","stacktrace":"#che ... ate@chrome://remote/content/shared/Navigate.jsm:209:28\nonStateChange@chrome://remote/content/shared/Navigate.jsm:254:28\n"}}
On Firefox 91 ESR, it work. But i need to use Firefox 102 ESR...
This is the trace of Geckodrive, when it work :
1686736611279 geckodriver INFO Listening on 127.0.0.1:4444
1686736615158 webdriver::server DEBUG -> POST /session {"capabilities": {"alwaysMatch": {"browserName": "firefox"}}}
1686736615161 geckodriver::capabilities DEBUG Trying to read firefox version from ini files
1686736615166 geckodriver::capabilities DEBUG Found version 91.6.1
1686736615203 mozrunner::runner INFO Running command: "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe" "--marionette" "-no-remote" "-profile" "C:\\Users\\DINL~1\\AppData\\Local\\Temp\\rust_mozprofilecJMgFM"
1686736615264 geckodriver::marionette DEBUG Waiting 60s to connect to browser on 127.0.0.1
1686736617276 geckodriver::marionette TRACE Retrying in 100ms
1686736619460 geckodriver::marionette DEBUG Connection to Marionette established on 127.0.0.1:54462.
1686736619506 webdriver::server DEBUG <- 200 OK {"value":{"sessionId":"8cb1eca2-cfc6-46bc-9df4-895ae8bcc699","capabilities":{"acceptInsecureCerts":false,"browserNa ... ctability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"}}}
1686736621008 webdriver::server DEBUG -> POST /session/8cb1eca2-cfc6-46bc-9df4-895ae8bcc699/url {"url":"http://intranet:8091/6"}
1686736623102 webdriver::server DEBUG <- 200 OK {"value":null}
1686736628111 webdriver::server DEBUG -> POST /session/8cb1eca2-cfc6-46bc-9df4-895ae8bcc699/execute/sync {"script":"return document.readyState", "args":[]}
1686736628186 webdriver::server DEBUG <- 200 OK {"value":"complete"}
1686736628194 webdriver::server DEBUG -> GET /session/8cb1eca2-cfc6-46bc-9df4-895ae8bcc699/source
1686736628208 webdriver::server DEBUG <- 200 OK {"value":"<html dir=\"ltr\" prefix=\"content: http://purl.org/rss/1.0/modules/content/ dc: http://purl.org/dc/term ... n<script src=\"/drupal/sites/default/files/js/js_U9sVfixVuiGoO9dIxqtdx3JE83V-8ylJoLJbSHsTvZE.js\"></script>\n</body></html>"}
On stackoverflow, i've seen an awnser, for change the System.setProperty, but it's in java and Selenium...
System.setProperty("webdriver.gecko.driver","C:\\Selenium\\geckodriver.exe");
I will continue to search, but if anyone have an idea, it will be nice.