1
$\begingroup$

When executing commands using WebExecute on the $CurrentWebSession like follows:

WebExecute[{
    "TypeElement"->{First@WebExecute["LocateElements"->"XPath"->"..."],"..."},
    "TypeElement"->{First@WebExecute["LocateElements"->"XPath"->"..."],"..."},
    "ClickElement"->First@WebExecute["LocateElements"->"XPath"->"..."],
    "OpenPage"->"..."
}];

I usually have to add manual pauses to make sure the page has been updated after the previous command execution and all the necessary elements have been loaded. Is there a way to check whether all the assets of the page have been loaded yet?

Something like $CurrentWebSession["CurrentStatus"]?

Otherwise, the next WebExecute command doesn't work properly if the element it requires hasn't been loaded yet. Sometimes there is the latency from the server-side and the WL doesn't automatically wait for everything to load.

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.