HJL Posted March 9, 2021 Share Posted March 9, 2021 6 hours ago, Nine said: I do not have Firefox installed. But you can read a whole section with RegEnumKey/RegEnumVal (look help file example to learn how to do it). Not that I know. File has not set its version property (on chrome) but it does have the version in msedgedriver.exe (use FileGetVersion) FileGetVersion works fine for edge, and, as you write, not for chrome because version is not set. Firefox is also read from registry. I located the version inside chromedriver,exe, it is just behind "handle.content". Now I try to get it with fileread, but no success up to now - the problem is what to search for because between handle and content is not "." but Hex 00. Some idea what is wrong in my function? Func _BlpReadDriverVersion($sFileChromeDriver) Local $hFileOpen = FileOpen($sFileChromeDriver) ; Read the contents of the file using the handle returned by FileOpen. Local $sFileRead = FileRead($hFileOpen) ; Close the handle returned by FileOpen. FileClose($hFileOpen) Local $iP1 = StringInStr($sFileRead, StringToBinary("handle" & Chr(0) & "content")) + 15 ; finds nothing, even "handle" doesn't ; find next " " = end of version Local $iP2 = StringInStr($sFileRead, " ", 0, 1, $iP1) Return StringMid($sFileRead, $iP1, $iP2 - $iP1) EndFunc Link to comment Share on other sites More sharing options...
Danp2 Posted March 9, 2021 Author Share Posted March 9, 2021 @HJL The idea is to reduce your code down to as few lines as possible in order to reproduce the issue. For example -- #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupEdge() _WD_Startup() If @error <> $_WD_ERROR_Success Then Exit -1 EndIf $sSession = _WD_CreateSession($sDesiredCapabilities) Func SetupEdge() _WD_Option('Driver', 'msedgedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\msedge.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}' EndFunc And here's the results from the Scite output panel -- >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\danpollak\Dropbox\webdriver\test3.au3" /UserParams +>12:48:54 Starting AutoIt3Wrapper (19.1127.1402.26) from:SciTE.exe (4.4.6.0) Keyboard:00000409 OS:WIN_10/2009 CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\danpollak\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\danpollak\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\danpollak\Dropbox\webdriver\test3.au3 +>12:48:54 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\danpollak\Dropbox\webdriver\test3.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. _WD_IsLatestRelease: True _WD_IsLatestRelease ==> Success _WD_Startup: OS: WIN_10 WIN32_NT 19042 _WD_Startup: AutoIt: 3.3.14.5 _WD_Startup: WD.au3: 0.4.0.1 (Up to date) _WD_Startup: WinHTTP: 1.6.4.2 _WD_Startup: Driver: msedgedriver.exe _WD_Startup: Params: --verbose --log-path="C:\Users\danpxxxxxx\Dropbox\webdriver\msedge.log" _WD_Startup: Port: 9515 __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}} __WD_Post: StatusCode=200; ResponseText={"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"msedge","browserVersion":"89.0.... _WD_CreateSession: {"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"msedge","browserVersion":"89.0.774.45","ms:edgeOptions":{"debuggerAddress":"localhost:64488"},"msedge":{"msedgedriverVersion":"89.0.774.45 (bb55f48a0d369c43828d1b214a80c5166f640ee2)","userDataDir":"C:\\Users\\danpxxxxxx\\AppData\\Local\\Temp\\scoped_dir28628_257693320"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"windows","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify","webauthn:extension:largeBlob":true,"webauthn:virtualAuthenticators":true},"sessionId":"76ab4e40a781e734150ae9d12e535c4b"}} +>12:48:59 AutoIt3.exe ended.rc:0 +>12:48:59 AutoIt3Wrapper Finished. >Exit code: 0 Time: 6.269 As you can see, MSEdge starts fine for me and _WD_CreateSession returns the expected info. You will need to investigate why you are receiving the GPU related errors. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Danp2 Posted March 9, 2021 Author Share Posted March 9, 2021 48 minutes ago, HJL said: I located the version inside chromedriver,exe, it is just behind "handle.content". This method of reading the version directly from the executable is not recommended because it will potentially break each time they release an update. Why are you gathering these details in the first place? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
HJL Posted March 9, 2021 Share Posted March 9, 2021 6 minutes ago, Danp2 said: This method of reading the version directly from the executable is not recommended because it will potentially break each time they release an update. Why are you gathering these details in the first place? We have the problem that neither chrome nor edge automatically update. We are searching for the reason for a long time. Edge should bei updated by WSUS, chrome by itself. But that only happens at both browsers when we click help / about, ... So some of our clients have older, some newer versions. When I globally change the webdrivers, then some of them work, others not. Therefore I log the versions from every client in a global.log to see, which client is not up to date. It is just to get some hint when I read the version from chromedriver.exe, if not found I write "unknown". The last three versions looked the same and the developer stupidly don't set the version to the place where it belongs. Link to comment Share on other sites More sharing options...
Nine Posted March 9, 2021 Share Posted March 9, 2021 Found a way : #include <Constants.au3> _BlpReadDriverVersion("..\webdriver\chromedriver.exe") Func _BlpReadDriverVersion($sFileChromeDriver) Local $hFileOpen = FileOpen($sFileChromeDriver, $FO_BINARY) Local $dFileRead = FileRead($hFileOpen) FileClose($hFileOpen) ; find handle.content Local $iPos = StringInStr($dFileRead, "68616E646C6500636F6E74656E7400", $STR_CASESENSE) - 1 ; position just after $iPos = Int($iPos / 2) + 15 ; extract version Local $sVersion = StringRegExp(BinaryToString(BinaryMid($dFileRead, $iPos, 32)), "[^\h]*", 1)[0] ConsoleWrite ($sVersion & @CRLF) Return $sVersion EndFunc “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
HJL Posted March 9, 2021 Share Posted March 9, 2021 (edited) 38 minutes ago, Danp2 said: @HJL The idea is to reduce your code down to as few lines as possible in order to reproduce the issue. For example -- And here's the results from the Scite output panel -- As you can see, MSEdge starts fine for me and _WD_CreateSession returns the expected info. You will need to investigate why you are receiving the GPU related errors. expandcollapse popup; the following statements are there because I put some tracing lines in wd_core Global $bDebugJson = False Func _BlpWriteLog($sText) ; do nothing EndFunc Local $sWebDriverFileEdge = "i:\BlpMenu\Webdriver\msedgedriver.exe" Local $sLogsPath = "c:\webdriver\" Local $sEdgeProfil = "C:/Webdriver/EDGE_WD_Profile" #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession _SetupEdge() _WD_Startup() If @error <> $_WD_ERROR_Success Then Exit -1 EndIf $sSession = _WD_CreateSession($sDesiredCapabilities) Func _SetupEdge() _WD_Option('Driver', $sWebDriverFileEdge) _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & $sLogsPath & 'edge.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"w3c": true, "args":["user-data-dir=' & $sEdgeProfil & '"]}}}}' EndFunc ;==>SetupEdge Func SetupEdge() _WD_Option('Driver', 'msedgedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\msedge.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}' EndFunc >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Webdriver\Entwicklung\TestEdge.au3" /UserParams +>20:24:30 Starting AutoIt3Wrapper (19.1127.1402.0} from:SciTE.exe (4.2.0.0) Keyboard:00000407 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0407) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\lenzen\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\lenzen\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:C:\Webdriver\Entwicklung\TestEdge.au3 +>20:24:31 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Webdriver\Entwicklung\TestEdge.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. _WD_IsLatestRelease: True _WD_IsLatestRelease ==> Success _WDStartup: OS: WIN_10 WIN32_NT 19042 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.4.0.1 (Up to date) _WDStartup: WinHTTP: 1.6.4.2 _WDStartup: Driver: i:\BlpMenu\Webdriver\msedgedriver.exe _WDStartup: Params: --log-path="c:\webdriver\edge.log" _WDStartup: Port: 9515 __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"w3c": true, "args":["user-data-dir=C:/Webdriver/EDGE_WD_Profile"]}}}} __WD_Post: StatusCode=400; ResponseText={"value":{"error":"invalid argument","message":"invalid argument: user data directory is already in ... __WD_Post ==> Invalid argument: {"value":{"error":"invalid argument","message":"invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir","stacktrace":"Backtrace:\n\tOrdinal0 [0x00007FF6644A98D2+170194]\n\tGetHandleVerifier [0x00007FF664C0C238+2219688]\n\tGetHandleVerifier [0x00007FF664C2FE82+2366194]\n\tGetHandleVerifier [0x00007FF664C29628+2339480]\n\tGetHandleVerifier [0x00007FF664C5B1E0+2543184]\n\tGetHandleVerifier [0x00007FF664C572EF+2527071]\n\tGetHandleVerifier [0x00007FF664C34F1A+2386826]\n\tGetHandleVerifier [0x00007FF664C35B5B+2389963]\n\tOrdinal0 [0x00007FF6644C38C1+276673]\n\tGetHandleVerifier [0x00007FF664CD7060+3050704]\n\tGetHandleVerifier [0x00007FF664CD9D7E+3062254]\n\tGetHandleVerifier [0x00007FF664CD78E8+3052888]\n\tOrdinal0 [0x00007FF664613410+1651728]\n\tOrdinal0 [0x00007FF664611C58+1645656]\n\tOrdinal0 [0x00007FF6645F3770+1521520]\n\tBaseThreadInitThunk [0x00007FFFFC137034+20]\n\tRtlUserThreadStart [0x00007FFFFD8FD241+33]\n"}} _WD_CreateSession: {"value":{"error":"invalid argument","message":"invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir","stacktrace":"Backtrace:\n\tOrdinal0 [0x00007FF6644A98D2+170194]\n\tGetHandleVerifier [0x00007FF664C0C238+2219688]\n\tGetHandleVerifier [0x00007FF664C2FE82+2366194]\n\tGetHandleVerifier [0x00007FF664C29628+2339480]\n\tGetHandleVerifier [0x00007FF664C5B1E0+2543184]\n\tGetHandleVerifier [0x00007FF664C572EF+2527071]\n\tGetHandleVerifier [0x00007FF664C34F1A+2386826]\n\tGetHandleVerifier [0x00007FF664C35B5B+2389963]\n\tOrdinal0 [0x00007FF6644C38C1+276673]\n\tGetHandleVerifier [0x00007FF664CD7060+3050704]\n\tGetHandleVerifier [0x00007FF664CD9D7E+3062254]\n\tGetHandleVerifier [0x00007FF664CD78E8+3052888]\n\tOrdinal0 [0x00007FF664613410+1651728]\n\tOrdinal0 [0x00007FF664611C58+1645656]\n\tOrdinal0 [0x00007FF6645F3770+1521520]\n\tBaseThreadInitThunk [0x00007FFFFC137034+20]\n\tRtlUserThreadStart [0x00007FFFFD8FD241+33]\n"}} _WD_CreateSession ==> Webdriver Exception: HTTP status = 400 +>20:24:40 AutoIt3.exe ended.rc:0 +>20:24:40 AutoIt3Wrapper Finished. >Exit code: 0 Time: 10.25 Starting MSEdgeDriver 89.0.774.45 (bb55f48a0d369c43828d1b214a80c5166f640ee2) on port 9515 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping MSEdgeDriver safe. MSEdgeDriver was started successfully. [16724:8336:0309/202437.241:ERROR:browser_gpu_channel_host_factory.cc(154)] Failed to launch GPU process. But here it doesn't ;-( Edited March 9, 2021 by HJL Link to comment Share on other sites More sharing options...
HJL Posted March 9, 2021 Share Posted March 9, 2021 7 minutes ago, Nine said: Found a way : Thanks, perfect, works (as long as the position in chromedriver.exe is not changed) 😉 @@ Debug(94) : Chrome: 89.0.4389.82 Edge: 89.0.774.45 FF: 86.0 (x64 de) (aus Registry) ChromeDriver: 89.0.4389.23 EdgeDriver: 89.0.774.45 Link to comment Share on other sites More sharing options...
Danp2 Posted March 9, 2021 Author Share Posted March 9, 2021 @HJL And you can't identify the issue from that output? 🙄 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
HJL Posted March 9, 2021 Share Posted March 9, 2021 (edited) >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Webdriver\Entwicklung\TestEdge.au3" /UserParams +>20:33:32 Starting AutoIt3Wrapper (19.1127.1402.0} from:SciTE.exe (4.2.0.0) Keyboard:00000407 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0407) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\lenzen\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\lenzen\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:C:\Webdriver\Entwicklung\TestEdge.au3 +>20:33:33 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Webdriver\Entwicklung\TestEdge.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. _WD_IsLatestRelease: True _WD_IsLatestRelease ==> Success _WDStartup: OS: WIN_10 WIN32_NT 19042 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.4.0.1 (Up to date) _WDStartup: WinHTTP: 1.6.4.2 _WDStartup: Driver: i:\BlpMenu\Webdriver\msedgedriver.exe _WDStartup: Params: --log-path="c:\webdriver\edge.log" _WDStartup: Port: 9515 __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"w3c": true, "args":["user-data-dir=C:/Webdriver/EDGE_WD_Profile"]}}}} __WD_Post: StatusCode=0; ResponseText=WinHTTP request timed out before Webdriver... __WD_Post ==> Send / Recv error: WinHTTP request timed out before Webdriver _WD_CreateSession: WinHTTP request timed out before Webdriver _WD_CreateSession ==> Webdriver Exception: HTTP status = 0 +>20:34:11 AutoIt3.exe ended.rc:0 +>20:34:12 AutoIt3Wrapper Finished. >Exit code: 0 Time: 40.6 Starting MSEdgeDriver 89.0.774.45 (bb55f48a0d369c43828d1b214a80c5166f640ee2) on port 9515 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping MSEdgeDriver safe. MSEdgeDriver was started successfully. [22704:21248:0309/203337.973:ERROR:browser_gpu_channel_host_factory.cc(154)] Failed to launch GPU process. DevTools listening on ws://127.0.0.1:51325/devtools/browser/82ef7784-3472-47ca-b8b7-250262d16472 [22704:17924:0309/203338.141:ERROR:edge_auth_errors.cc(381)] EDGE_IDENTITY: Get Default OS Account failed: Error: Primary Error: kImplicitSignInFailure, Secondary Error: kAccountProviderFetchError, Platform error: 0, Error string: [22704:21248:0309/203338.168:ERROR:browser_gpu_channel_host_factory.cc(154)] Failed to launch GPU process. 4 minutes ago, Danp2 said: @HJL And you can't identify the issue from that output? 🙄 Sorry, no 😞 Sorry, I see it - but thats another error - there was an open edge-window. Edited March 9, 2021 by HJL Link to comment Share on other sites More sharing options...
Danp2 Posted March 9, 2021 Author Share Posted March 9, 2021 @HJL Suggest that you try harder to identify the issue. Forget the output from the Edgedriver console. Focus on the Scite output. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
HJL Posted March 9, 2021 Share Posted March 9, 2021 (edited) 7 minutes ago, Danp2 said: @HJL Suggest that you try harder to identify the issue. Forget the output from the Edgedriver console. Focus on the Scite output. Me: $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"w3c": true, "args":["user-data-dir=' & $sEdgeProfil & '"]}}}}' You: $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}' I am coming closer: you works, me not. It seems to be a problem with my edgeprofil, there is a message that an addon fails. Edited March 9, 2021 by HJL Link to comment Share on other sites More sharing options...
ThomasBennett Posted March 12, 2021 Share Posted March 12, 2021 Good morning everyone, I am trying to figure out how _WD_WaitElement $iTimeout should look in the script. ; Name ..........: _WD_WaitElement ; Description ...: Wait for a element to be found in the current tab before returning ; Syntax ........: _WD_WaitElement($sSession, $sStrategy, $sSelector[, $iDelay = Default[, $iTimeout = Default[, $lVisible = Default[, ; $lEnabled = Default[, $lReturnElement = Default]]]]]) ; Parameters ....: $sSession - Session ID from _WD_CreateSession ; $sStrategy - Locator strategy. See defined constant $_WD_LOCATOR_* for allowed values ; $sSelector - Value to find ; $iDelay - [optional] Milliseconds to wait before checking status ; $iTimeout - [optional] Period of time to wait before exiting function ; $lVisible - [optional] Check visibility of element? ; $lEnabled - [optional] Check enabled status of element? ; $lReturnElement - [optional] Return found element? The script uploads a file to a website and a progress button is shown; uploading, processing, completed. _WD_WaitElement($sSession, $_WD_LOCATOR_ByXPath, "xpath=//span[contains(.,'Completed')]","",1200000) Would this be the correct call to have the script pause for 30 minutes, until the "Completed" text appears? I want the script to immediately start looking for "Completed" but not continue processing until "Completed" appears. It's a variable amount of time for each file; so I was thinking I should use the $iTimeout; just not sure how it should look in code. Thank you for your time and assistance this morning and please have a great day, Thomas Link to comment Share on other sites More sharing options...
Nine Posted March 12, 2021 Share Posted March 12, 2021 30 mins is 1800000 . This is why I prefer to put the calculation (as it is more readable). $iDelay is not a string, so Default, would be better although it would have worked anyway. _WD_WaitElement($sSession, $_WD_LOCATOR_ByXPath, "xpath=//span[contains(.,'Completed')]", Default, 30*60*1000) ThomasBennett 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
ThomasBennett Posted March 12, 2021 Share Posted March 12, 2021 4 hours ago, Nine said: 30 mins is 1800000 . This is why I prefer to put the calculation (as it is more readable). $iDelay is not a string, so Default, would be better although it would have worked anyway. _WD_WaitElement($sSession, $_WD_LOCATOR_ByXPath, "xpath=//span[contains(.,'Completed')]", Default, 30*60*1000) Thank you, Nine! I didn't even think to break it down as a formula. Thank you for the example and the correction. Link to comment Share on other sites More sharing options...
Letraindusoir Posted March 16, 2021 Share Posted March 16, 2021 _WD_FindElement($sSession, $sStrategy, $sSelector, $sStartNodeID = Default, $lMultiple = Default, $lShadowRoot = Default) any more examples? Has not been very clear about this '$lMultiple=true' application scene...... Link to comment Share on other sites More sharing options...
Danp2 Posted March 16, 2021 Author Share Posted March 16, 2021 @Letraindusoir That's the syntax line from the function header, so it's not a true example. Did you happen to check wd_demo, which has an example in the DemoElements function? You can also check out the coding of _WD_ElementSelectAction and _WD_GetTable. There are likely other examples on the forum is you do an appropriate search. 😉 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
VodkaDiva Posted March 16, 2021 Share Posted March 16, 2021 (edited) Hi @Danp2 I have tried to click on frames for more than 2 days but I can't. So now I dare to ask for your help. I am trying to click to upload an image in an iframe. Here is my code ConsoleWrite("Frames=" & _WD_GetFrameCount($sSession) & @CRLF) ConsoleWrite("TopWindow=" & _WD_IsWindowTop($sSession) & @CRLF) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "/html/body/iframe[1]") ;Get = copy full xpath _WD_FrameEnter($sSession, $sElement) Sleep(1000) ConsoleWrite("TopWindow1=" & _WD_IsWindowTop($sSession) & @CRLF) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "/html/body/div[4]/div[2]/section/div/div[4]/div/div/div/div[2]/div/div/div/div[2]/div/div/div[2]/div[2]/div[2]/div/div[1]/div/div[2]/div/form/input[2]") _WD_ElementAction($sSession, $sElement, "click") Sleep(2000) _WD_LoadWait($sSession, 0) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//input[@id='listing-edit-image-upload']") _WD_ElementAction($sSession, $sElement, 'click') Sleep(2000) _WD_FrameLeave($sSession) ConsoleWrite("TopWindow2=" & _WD_IsWindowTop($sSession) & @CRLF) And debug here : expandcollapse popupFrames=3 __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/execute/sync; $sData={"script":"return window.top == window.self", "args":[[]]} __WD_Post: StatusCode=200; ResponseText={"value":true} _WD_ExecuteScript: {"value":true} TopWindow=True __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/element; $sData={"using":"xpath","value":"/html/body/iframe[1]"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"49a4da68-ca10-4917-86af-7405b5fffec2"}} _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"49a4da68-ca10-4917-86af-7405b5fffec2"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/frame; $sData={"id":{"element-6066-11e4-a52e-4f735466cecf":"49a4da68-ca10-4917-86af-7405b5fffec2"}} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_Window: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/execute/sync; $sData={"script":"return window.top == window.self", "args":[[]]} __WD_Post: StatusCode=200; ResponseText={"value":false} _WD_ExecuteScript: {"value":false} TopWindow1=False __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/element; $sData={"using":"xpath","value":"/html/body/div[4]/div[2]/section/div/div[4]/div/div/div/div[2]/div/div/div/div[2]/div/div/div[2]/div[2]/div[2]/div/div[1]/div/div[2]/div/form/input[2]"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"/html/body/div[4]/div[2]/section/div/div[4]/div/div/div/div[2]/div/div/div/div[2]/div/div/div[2]/div[2]/div[2]/div/div[1]/div/div[2]/div/form/input[2]\"}\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68D18+101656]\n\tOrdinal0 [0x00E848B0+215216]\n\tOrdinal0 [0x00E79FE0+172000]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} _WD_FindElement: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"/html/body/div[4]/div[2]/section/div/div[4]/div/div/div/div[2]/div/div/div/div[2]/div/div/div[2]/div[2]/div[2]/div/div[1]/div/div[2]/div/form/input[2]\"}\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68D18+101656]\n\tOrdinal0 [0x00E848B0+215216]\n\tOrdinal0 [0x00E79FE0+172000]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} _WD_FindElement ==> No match: HTTP status = 404 __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/element//click; $sData={"id":""} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68653+99923]\n\tOrdinal0 [0x00E69969+104809]\n\tOrdinal0 [0x00E63A9F+80543]\n\tOrdinal0 [0x00E79FAD+171949]\n\tOrdinal0 [0x00E639A6+80294]\n\tOrdinal0 [0x00E7A1F1+172529]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} _WD_ElementAction: {"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Ses... _WD_ElementAction ==> Webdriver Exception: {"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68653+99923]\n\tOrdinal0 [0x00E69969+104809]\n\tOrdinal0 [0x00E63A9F+80543]\n\tOrdinal0 [0x00E79FAD+171949]\n\tOrdinal0 [0x00E639A6+80294]\n\tOrdinal0 [0x00E7A1F1+172529]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/execute/sync; $sData={"script":"return document.readyState", "args":[]} __WD_Post: StatusCode=200; ResponseText={"value":"complete"} _WD_ExecuteScript: {"value":"complete"} __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/element; $sData={"using":"xpath","value":"//input[@id='listing-edit-image-upload']"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//input[@id='listing-edit-image-upload']\"}\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68D18+101656]\n\tOrdinal0 [0x00E848B0+215216]\n\tOrdinal0 [0x00E79FE0+172000]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} _WD_FindElement: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//input[@id='listing-edit-image-upload']\"}\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68D18+101656]\n\tOrdinal0 [0x00E848B0+215216]\n\tOrdinal0 [0x00E79FE0+172000]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} _WD_FindElement ==> No match: HTTP status = 404 __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/element//click; $sData={"id":""} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68653+99923]\n\tOrdinal0 [0x00E69969+104809]\n\tOrdinal0 [0x00E63A9F+80543]\n\tOrdinal0 [0x00E79FAD+171949]\n\tOrdinal0 [0x00E639A6+80294]\n\tOrdinal0 [0x00E7A1F1+172529]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} _WD_ElementAction: {"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Ses... _WD_ElementAction ==> Webdriver Exception: {"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68653+99923]\n\tOrdinal0 [0x00E69969+104809]\n\tOrdinal0 [0x00E63A9F+80543]\n\tOrdinal0 [0x00E79FAD+171949]\n\tOrdinal0 [0x00E639A6+80294]\n\tOrdinal0 [0x00E7A1F1+172529]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/execute/sync; $sData={"script":"return document.readyState", "args":[]} __WD_Post: StatusCode=200; ResponseText={"value":"complete"} _WD_ExecuteScript: {"value":"complete"} __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/element; $sData={"using":"xpath","value":"//div[@class='_z4f']//div[1]//li[1]"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//div[@class='_z4f']//div[1]//li[1]\"}\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68D18+101656]\n\tOrdinal0 [0x00E848B0+215216]\n\tOrdinal0 [0x00E79FE0+172000]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} _WD_FindElement: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//div[@class='_z4f']//div[1]//li[1]\"}\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68D18+101656]\n\tOrdinal0 [0x00E848B0+215216]\n\tOrdinal0 [0x00E79FE0+172000]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} _WD_FindElement ==> No match: HTTP status = 404 __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/element//click; $sData={"id":""} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68653+99923]\n\tOrdinal0 [0x00E69969+104809]\n\tOrdinal0 [0x00E63A9F+80543]\n\tOrdinal0 [0x00E79FAD+171949]\n\tOrdinal0 [0x00E639A6+80294]\n\tOrdinal0 [0x00E7A1F1+172529]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} _WD_ElementAction: {"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Ses... _WD_ElementAction ==> Webdriver Exception: {"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Session info: chrome=81.0.4044.92)","stacktrace":"Backtrace:\n\tOrdinal0 [0x010A5F73+2449267]\n\tOrdinal0 [0x00FD8361+1606497]\n\tOrdinal0 [0x00ECF969+522601]\n\tOrdinal0 [0x00E68653+99923]\n\tOrdinal0 [0x00E69969+104809]\n\tOrdinal0 [0x00E63A9F+80543]\n\tOrdinal0 [0x00E79FAD+171949]\n\tOrdinal0 [0x00E639A6+80294]\n\tOrdinal0 [0x00E7A1F1+172529]\n\tOrdinal0 [0x00E8326C+209516]\n\tOrdinal0 [0x00E79E5B+171611]\n\tOrdinal0 [0x00E61DD8+73176]\n\tOrdinal0 [0x00E62E50+77392]\n\tOrdinal0 [0x00E62DE9+77289]\n\tOrdinal0 [0x00FED8D7+1693911]\n\tGetHandleVerifier [0x01144036+522726]\n\tGetHandleVerifier [0x01143D74+522020]\n\tGetHandleVerifier [0x01159187+609079]\n\tGetHandleVerifier [0x011448A6+524886]\n\tOrdinal0 [0x00FE5CBC+1662140]\n\tOrdinal0 [0x00FEF23B+1700411]\n\tOrdinal0 [0x00FEF3A3+1700771]\n\tOrdinal0 [0x01005215+1790485]\n\tBaseThreadInitThunk [0x776D347D+18]\n\tRtlInitializeExceptionChain [0x77EA9852+99]\n\tRtlInitializeExceptionChain [0x77EA9825+54]\n"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/execute/sync; $sData={"script":"return document.readyState", "args":[]} __WD_Post: StatusCode=200; ResponseText={"value":"complete"} _WD_ExecuteScript: {"value":"complete"} __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/frame/parent; $sData={} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_Window: {"value":null}... __WD_Post: URL=HTTP://127.0.0.1:9515/session/dd993c25cf48d292cce89c376b27f567/execute/sync; $sData={"script":"return window.top == window.self", "args":[[]]} __WD_Post: StatusCode=200; ResponseText={"value":true} _WD_ExecuteScript: {"value":true} TopWindow2=True As I see it has entered iframe but can't click on that icon. It can't find element . But i element = copy full xpath I don't know where is wrong, Hope you help. Thank you Danp2 Thank you so much. Edited March 16, 2021 by VodkaDiva xxxxxxxxxxx Link to comment Share on other sites More sharing options...
Danp2 Posted March 16, 2021 Author Share Posted March 16, 2021 20 minutes ago, VodkaDiva said: As I see it has entered iframe but can't click on that icon. It can't find element . But i element = copy full xpath Either you've entered the wrong frame or the xpath is incorrect. 🤷♂️ Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
VodkaDiva Posted March 17, 2021 Share Posted March 17, 2021 Thanks @Danp2 . I just use copy full xpath . let me check again . love you xxxxxxxxxxx Link to comment Share on other sites More sharing options...
HJL Posted March 19, 2021 Share Posted March 19, 2021 Hi, since our browsers do not always update themselves to the latest version despite the appropriate settings, I have a workaround _WD_Navigate ($ sSession, $ sBrowser & ": // settings / help") built into my program. This means that everyone starts first with the page that provides a possible update. In Firefox it does not seem to work with the Url ... 😕/ settings / help. How could I do that with Firefox? And does anyone have an idea how the updates can actually be installed automatically in a timely manner - we've tried everything possible for a long time? yesterday I saw that e.g. Chrome would have to be updated immediately from 89.0.4389.82 to version 89.0.4389.90 because of a high-risk security hole. And our browsers don't do it automatically. Thanks for your help again. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now