diff --git a/Selenium-Functions.ahk b/Selenium-Functions.ahk index faa681d..dbf3e5d 100644 --- a/Selenium-Functions.ahk +++ b/Selenium-Functions.ahk @@ -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 }