|
|
@ -790,17 +790,27 @@ Selenium_LoopToClickXpathAndWaitForOpenWindow(Xpath,NumOfLoops:=1,SleepLength:=1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Selenium_LoopToClearXpath(Xpath,NumOfLoops:=1,SleepLength:=1000){
|
|
|
|
Selenium_LoopToClearXpath(Xpath,NumberOfAttemps:=1,SleepLength:=1000){
|
|
|
|
loop, %NumOfLoops% {
|
|
|
|
loop, %NumberOfAttemps% {
|
|
|
|
|
|
|
|
|
|
|
|
try driver.FindElementByXPath(Xpath).clear()
|
|
|
|
try driver.FindElementByXPath(Xpath).clear()
|
|
|
|
catch e {
|
|
|
|
catch e {
|
|
|
|
if(A_index = NumOfLoops){
|
|
|
|
|
|
|
|
Return "Failed"
|
|
|
|
Return "Failed"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sleep, %SleepLength%
|
|
|
|
sleep, %SleepLength%
|
|
|
|
Continue
|
|
|
|
|
|
|
|
|
|
|
|
try, InerText := driver.findelementbyxpath(Xpath).Attribute("value")
|
|
|
|
|
|
|
|
; Msgbox % "InerText: " InerText
|
|
|
|
|
|
|
|
if(InerText = "")
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(A_index = NumberOfAttemps){
|
|
|
|
|
|
|
|
return "Failed after %NumberOfAttemps"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Return
|
|
|
|
|
|
|
|
|
|
|
|
Continue
|
|
|
|
|
|
|
|
; Return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|