|
|
|
@ -722,7 +722,7 @@ Selenium_LoopToSendValueByName(ElementName,NumOfLoops:=1,SleepLength:=1000,Strin
|
|
|
|
|
|
|
|
|
|
Selenium_LoopToSendValueToXpath(Xpath,NumOfLoops:=1,SleepLength:=1000,StringTextContent:="",ClearElement:=0){
|
|
|
|
|
; Msgbox % "StringTextContent: " StringTextContent
|
|
|
|
|
; Msgbox % "ClearElement: " ClearElement
|
|
|
|
|
; Msgbox % "ClearElement: " ClearElement
|
|
|
|
|
|
|
|
|
|
loop, %NumOfLoops% {
|
|
|
|
|
; msgbox % ClearElement
|
|
|
|
@ -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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -834,12 +844,12 @@ SaveDriverURLOFErrorPage(){ ; save the url of the result page. That way if a tab
|
|
|
|
|
|
|
|
|
|
GetHTMLValueFromXpathOuterHTML(XPATH, HTMLElementName){
|
|
|
|
|
|
|
|
|
|
Try ElementOuterHTML := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
|
|
|
|
; try Clipboard := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
|
|
|
|
; Try MsgBox,,Element OuterHTML: `n, % driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
|
|
|
|
Try ElementOuterHTML := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
|
|
|
|
; try Clipboard := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
|
|
|
|
; Try MsgBox,,Element OuterHTML: `n, % driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
|
|
|
|
|
|
|
|
|
; Match string between quotes following the HTMLELEMENTNAME
|
|
|
|
|
RegexStatement = %HTMLElementName%="([^"]+)"
|
|
|
|
|
; Match string between quotes following the HTMLELEMENTNAME
|
|
|
|
|
RegexStatement = %HTMLElementName%="([^"]+)"
|
|
|
|
|
|
|
|
|
|
; regexMatch := RegExMatch(ElementOuterHTML, "value=""([^""]+)""", match)
|
|
|
|
|
regexMatch := RegExMatch(ElementOuterHTML, RegexStatement, match)
|
|
|
|
|