added function to send text to xpath element letter-by-letter
This commit is contained in:
@@ -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
|
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
|
try URLOfLastErrorPage := driver.URL
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user