added function to send text to xpath element letter-by-letter

main
Yuriy 1 year ago
parent 5d0932c150
commit c6cf2a408a

@ -773,6 +773,29 @@ Selenium_LoopToClearXpath(Xpath,NumOfLoops:=1,SleepLength:=1000){
}
}
Selenium_TypeTextIntoElement(Text, Xpath){
StrLengthOfPost := StrLen(Text)
Loop % StrLengthOfPost{
Current_Char := SubStr(Text, A_index, 1)
; Msgbox % "Current_Char: " Current_Char
; driver.FindElementByXPath(Xpath).SendKeys(VAR)
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=100,StringTextContent:=Current_Char)
if(Status){
Message = Failed to Input Text
Return Message
}
}
}
SaveDriverURLOFErrorPage(){ ; save the url of the result page. That way if a tab is not found for a site, we can open up a tab from this tab instead of middle of nowhere. That way we can keep the tabs together
try URLOfLastErrorPage := driver.URL
}

Loading…
Cancel
Save