
Math43
Members-
Posts
11 -
Joined
-
Last visited
Everything posted by Math43
-
WebDriver UDF - Help & Support (II)
Math43 replied to Danp2's topic in AutoIt General Help and Support
I've just found a way with a Chrome's GPO for Windows by using URLWhitelist option. Registry tweak is: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\URLWhitelist] "1"="vmware-plugin://*" Anyway, thank again for you help Danp2 ! -
WebDriver UDF - Help & Support (II)
Math43 replied to Danp2's topic in AutoIt General Help and Support
Thank for you answer. In fact this popup seem to be generated by the browser and not by the page, i'm unable to find anything in the dev tool and there is no html or associated. -
WebDriver UDF - Help & Support (II)
Math43 replied to Danp2's topic in AutoIt General Help and Support
Hi, I'm trying to dismiss an alert popup in Chrome but I'm not sure how to do. I've tried with : _WD_Alert($sSession, 'dismiss') but i've got an error in return: __WD_Post: URL=HTTP://127.0.0.1:57053/session/4b0858233f6c2266e3f3eaaa70b043fb/alert/dismiss; $sData={} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such alert","message":"no such alert\n (Session info: chrome=83.0.4103.116)",... _WD_Alert: {"value":{"error":"no such alert","message":"no such alert\n (Session info: chrome=83.0.4103.116)","stacktrace":"Backtrace:\n\tOrdinal0 [0x01369563+2725219]\n\tOrdinal0 [0x01268551+1672529]\n\tOrdinal0 [0x01150202+524802]\n\tOrdinal0 [0x0114D651+513617]\n\tOrdinal0 [0x010D4B65+19301]\n\tOrdinal0 [0x010FAAFA+174842]\n\tOrdinal0 [0x010D4704+18180]\n\tOrdinal0 [0x010FA94B+174411]\n\tOrdinal0 [0x010E2528+75048]\n\tOrdinal0 [0x010E35A0+79264]\n\tOrdinal0 [0x010E3539+79161]\n\tOrdinal0 [0x0127D607+1758727]\n\tGetHandleVerifier [0x01486546+1050150]\n\tGetHandleVerifier [0x01486291+1049457]\n\tGetHandleVerifier [0x014910D7+1094071]\n\tGetHandleVerifier [0x01486B46+1051686]\n\tOrdinal0 [0x01275B06+1727238]\n\tOrdinal0 [0x0127EB7B+1764219]\n\tOrdinal0 [0x0127ECE3+1764579]\n\tOrdinal0 [0x01294C05+1854469]\n\tBaseThreadInitThunk [0x755962C4+36]\n\tRtlSubscribeWnfStateChangeNotification [0x77BD0969+1081]\n\tRtlSubscribeWnfStateChangeNotification [0x77BD0934+1028]\n"}} _WD_Alert ==> No alert present: {"value":{"error":"no such alert","message":"no such alert\n (Session info: chrome=83.0.4103.116)","stacktrace":"Backtrace:\n\tOrdinal0 [0x01369563+2725219]\n\tOrdinal0 [0x01268551+1672529]\n\tOrdinal0 [0x01150202+524802]\n\tOrdinal0 [0x0114D651+513617]\n\tOrdinal0 [0x010D4B65+19301]\n\tOrdinal0 [0x010FAAFA+174842]\n\tOrdinal0 [0x010D4704+18180]\n\tOrdinal0 [0x010FA94B+174411]\n\tOrdinal0 [0x010E2528+75048]\n\tOrdinal0 [0x010E35A0+79264]\n\tOrdinal0 [0x010E3539+79161]\n\tOrdinal0 [0x0127D607+1758727]\n\tGetHandleVerifier [0x01486546+1050150]\n\tGetHandleVerifier [0x01486291+1049457]\n\tGetHandleVerifier [0x014910D7+1094071]\n\tGetHandleVerifier [0x01486B46+1051686]\n\tOrdinal0 [0x01275B06+1727238]\n\tOrdinal0 [0x0127EB7B+1764219]\n\tOrdinal0 [0x0127ECE3+1764579]\n\tOrdinal0 [0x01294C05+1854469]\n\tBaseThreadInitThunk [0x755962C4+36]\n\tRtlSubscribeWnfStateChangeNotification [0x77BD0969+1081]\n\tRtlSubscribeWnfStateChangeNotification [0x77BD0934+1028]\n"}} -
Hi, Do you know if it's possible to run multiple instances of chrome webdriver ? Regards, Math
-
Yes i've review wd_demo and try to reproduce without success. Here is my example: _WD_Navigate($sSession, $sUrl) Sleep(3000) ; Wait for username input field before starting to auto complete _WD_WaitElement($sSession,$_WD_LOCATOR_ByXPath,"//input[@id='"&$sUsernameField&"']") ConsoleWrite(@error & @CRLF) @error always display 0, event _WD_WaitElement failed or not. Regards, Mathieu
-
Do you have any example to track @error ? When I try to print @error after a WD function, I always get a "0" even the function has failed. Regards, Math
-
Hi, Finaly I wrote the following script to anwser my needs: Func TrackChrome($iPidChromeDriver) Local $sWmicQuery Local $hWmicAnswer Local $iPidChromeBrowser Local $sOutput $sWmicQuery = 'wmic process where (ParentProcessId='&$iPidChromeDriver&' and Caption="chrome.exe") get ProcessId /format:VALUE' ; run your query hidden and with redirected I/O streams ;$hPiD = Run($sWMICquery, '', @SW_HIDE, $STDERR_MERGED) $hWmicAnswer = Run($sWmicQuery, '', @SW_HIDE, $STDERR_MERGED) Do Sleep(100) $sOutput &= StdoutRead($hWmicAnswer) ; get wmic output from redirected stream Until @error ; error occurs when command has finished ConsoleWrite($sOutput & @CRLF) $sOutput = StringStripWS($sOutput, $STR_STRIPALL) ; remove all @cr and spaces from output $array = StringSplit($sOutput, "=") $iPidChromeBrowser = $array[2] ConsoleWrite($iPidChromeBrowser & @CRLF) While ProcessExists($iPidChromeBrowser) Sleep(1000) Wend EndFunc To describe my function; I getting $iPidChromeDriver from _WD_CreateSession I use wmic to find PID of child process name "chrome.exe" I block my script in a loop with exist condition is process not exist anymore After my function I use _WD_DeleteSession($sSession) and _WD_Shutdown() Thanks you very much for your help DanP2 Just for information, event with _WD_ConsoleVisible set to true, WebDriver Console is still visible.
-
Ok, thanks, if I understand well code in DemoElements, error are triggered because the next line of the code can be executed. The main purpose of my script is to auto login a user on a website and after user can manually use the website, so all my script have been already process and the closing of tab or browser can happen 5 min or 10hours after the end launch of the session. Is the solution you have proposed will work in my case ? Regards, Mathieu
-
I've not see any error when I close browser, script is "only" waiting. Could you tell me a little more about ? Thanks !
-
Hello, did you know is there is any to get PID of chrome process launch by chromedriver.exe ? I want to close webdriver console if user close tab or browser. Thanks ! Regards, Mathieu
-
Hello, i've right my first (simple) script with UDF WebDriver and it's working well when i run it from Scite (F5) but after compilation i've a message box error. After clicking on Ok, script is working well.. Message box seems to be triggered by this line: _WD_WaitElement($sSession,$_WD_LOCATOR_ByXPath,"//div[@id='loginForm']") Thanks for your help ! Math