Exit 154 Posted June 12, 2019 (edited) Edit: Problem solved. See my post 4 entries below. I am currently converting a script from internet explorer to google chrome. Now I'm looking for the replacement for _IELOADWAIT() My first attempt was $oWindowPattern1.WaitForInputIdle($iMilliSeconds, $bSuccess) but unfortunately the script did not wait. Does anyone has a solution? Edited June 14, 2019 by Exit App: Au3toCmd UDF: _SingleScript() Share this post Link to post Share on other sites
Danp2 909 Posted June 13, 2019 You will need to check the status of document.readyState as mentioned below -- P.S. You can take a look at _WD_LoadWait from the Webdriver UDF for how we implemented it there. [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
Exit 154 Posted June 13, 2019 Seems pretty complicated. But I'll try my best. 🤔 App: Au3toCmd UDF: _SingleScript() Share this post Link to post Share on other sites
junkew 406 Posted June 14, 2019 Check if the next element you want to act on is available Pixelchecksum Sleep 5000 Javascript thru addressbar will give you also access to all dom info. .... Many alternatives are there depending on your goal and requirements. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Share this post Link to post Share on other sites
Exit 154 Posted June 14, 2019 (edited) Now I have found a solution. Unfortunately, there is a dependency on the German language. ☹️ But my problem is solved. Here is my solution: expandcollapse popup;~ _IELoadWait($oIE) ;~ ============================================================= ; find "Google Chrome" pane Local $pCondition0, $pPane1, $oPane1 $oUIAutomation.CreatePropertyCondition($UIA_NamePropertyId, "Google Chrome", $pCondition0) $oWindow.FindFirst($TreeScope_Descendants, $pCondition0, $pPane1) $oPane1 = ObjCreateInterface($pPane1, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) ; Find "Neu laden" Button Local $pCondition1, $pButton, $oButton $oUIAutomation.CreatePropertyCondition($UIA_NamePropertyId, "Neu laden", $pCondition1) $oPane1.FindFirst($TreeScope_Descendants, $pCondition1, $pButton) $oButton = ObjCreateInterface($pButton, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) ; Get "Neu laden" button description Local $sLegacyIAccessibleDescription1 $oButton.GetCurrentPropertyValue($UIA_LegacyIAccessibleDescriptionPropertyId, $sLegacyIAccessibleDescription1) ConsoleWrite("Before reload: $sLegacyIAccessibleDescription1 = " & $sLegacyIAccessibleDescription1 & @CRLF) ; reload Window ControlSend($hWin, "", "", "^r") ; neu laden Sleep(100) ; allow refresh to start ; wait for "noload" description While $sLegacyIAccessibleDescription1 <> "Seite nicht weiter laden" $oButton.GetCurrentPropertyValue($UIA_LegacyIAccessibleDescriptionPropertyId, $sLegacyIAccessibleDescription1) Sleep(20) WEnd ConsoleWrite("During reload: $sLegacyIAccessibleDescription1 = " & $sLegacyIAccessibleDescription1 & @CRLF) ; wait for "load complete" description While $sLegacyIAccessibleDescription1 <> "Diese Seite neu laden" $oButton.GetCurrentPropertyValue($UIA_LegacyIAccessibleDescriptionPropertyId, $sLegacyIAccessibleDescription1) Sleep(20) WEnd ConsoleWrite("After reload: $sLegacyIAccessibleDescription1 = " & $sLegacyIAccessibleDescription1 & @CRLF) ;~ end of _IELoadWait($oIE) sollution ;~ ============================================================= And here's the console output: Before reload: $sLegacyIAccessibleDescription1 = Diese Seite neu laden During reload: $sLegacyIAccessibleDescription1 = Seite nicht weiter laden After reload: $sLegacyIAccessibleDescription1 = Diese Seite neu laden Edited June 14, 2019 by Exit App: Au3toCmd UDF: _SingleScript() Share this post Link to post Share on other sites