small bug fixes and improvements

main
Yuriy 7 months ago
parent b19482e10d
commit 0e02ae24bd

@ -790,17 +790,27 @@ Selenium_LoopToClickXpathAndWaitForOpenWindow(Xpath,NumOfLoops:=1,SleepLength:=1
}
Selenium_LoopToClearXpath(Xpath,NumOfLoops:=1,SleepLength:=1000){
loop, %NumOfLoops% {
Selenium_LoopToClearXpath(Xpath,NumberOfAttemps:=1,SleepLength:=1000){
loop, %NumberOfAttemps% {
try driver.FindElementByXPath(Xpath).clear()
catch e {
if(A_index = NumOfLoops){
Return "Failed"
}
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
}
}

Loading…
Cancel
Save