error checkign and general msgbox window
This commit is contained in:
@@ -722,13 +722,13 @@ Selenium_LoopToSendValueByName(ElementName,NumOfLoops:=1,SleepLength:=1000,Strin
|
|||||||
|
|
||||||
Selenium_LoopToSendValueToXpath(Xpath,NumOfLoops:=1,SleepLength:=1000,StringTextContent:="",ClearElement:=0){
|
Selenium_LoopToSendValueToXpath(Xpath,NumOfLoops:=1,SleepLength:=1000,StringTextContent:="",ClearElement:=0){
|
||||||
; Msgbox % "StringTextContent: " StringTextContent
|
; Msgbox % "StringTextContent: " StringTextContent
|
||||||
; Msgbox % "ClearElement: " ClearElement
|
; Msgbox % "ClearElement: " ClearElement
|
||||||
|
|
||||||
loop, %NumOfLoops% {
|
loop, %NumOfLoops% {
|
||||||
; msgbox % ClearElement
|
; msgbox % ClearElement
|
||||||
if(ClearElement){
|
if(ClearElement){
|
||||||
Loop, 3 { ; have to do it multiple times to make it trigger properly
|
Loop, 3 { ; have to do it multiple times to make it trigger properly
|
||||||
driver.FindElementByXPath(Xpath).clear()
|
try, driver.FindElementByXPath(Xpath).clear()
|
||||||
sleep, 500
|
sleep, 500
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -834,12 +834,12 @@ SaveDriverURLOFErrorPage(){ ; save the url of the result page. That way if a tab
|
|||||||
|
|
||||||
GetHTMLValueFromXpathOuterHTML(XPATH, HTMLElementName){
|
GetHTMLValueFromXpathOuterHTML(XPATH, HTMLElementName){
|
||||||
|
|
||||||
Try ElementOuterHTML := 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 Clipboard := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
||||||
; Try MsgBox,,Element OuterHTML: `n, % 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
|
; Match string between quotes following the HTMLELEMENTNAME
|
||||||
RegexStatement = %HTMLElementName%="([^"]+)"
|
RegexStatement = %HTMLElementName%="([^"]+)"
|
||||||
|
|
||||||
; regexMatch := RegExMatch(ElementOuterHTML, "value=""([^""]+)""", match)
|
; regexMatch := RegExMatch(ElementOuterHTML, "value=""([^""]+)""", match)
|
||||||
regexMatch := RegExMatch(ElementOuterHTML, RegexStatement, match)
|
regexMatch := RegExMatch(ElementOuterHTML, RegexStatement, match)
|
||||||
@@ -1004,3 +1004,13 @@ OnMsgBoxJSReturnData() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Show a user confirmation msgbox with a proceed and STOP buttons
|
||||||
|
; Used by the "Confirm before Submit" checkbox
|
||||||
|
OnMsgBoxUserConfirmation() {
|
||||||
|
DetectHiddenWindows, On
|
||||||
|
Process, Exist
|
||||||
|
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||||
|
ControlSetText Button1, PROCEED
|
||||||
|
ControlSetText Button2, STOP
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user