formatting and cleanup
This commit is contained in:
@@ -721,21 +721,27 @@ Selenium_LoopToSendValueByName(ElementName,NumOfLoops:=1,SleepLength:=1000,Strin
|
||||
}
|
||||
|
||||
Selenium_LoopToSendValueToXpath(Xpath,NumOfLoops:=1,SleepLength:=1000,StringTextContent:="",ClearElement:=0){
|
||||
; Msgbox % "StringTextContent: " StringTextContent
|
||||
; Msgbox % "ClearElement: " ClearElement
|
||||
|
||||
loop, %NumOfLoops% {
|
||||
; msgbox % ClearElement
|
||||
|
||||
if(ClearElement){
|
||||
Loop, 3 { ; have to do it multiple times to make it trigger properly
|
||||
Loop, 3 { ; sometimes have to do it multiple times to make it trigger properly
|
||||
Try PreviousValue := driver.findelementbyxpath(Xpath).Attribute("value") ;Xpath Value
|
||||
|
||||
try, driver.FindElementByXPath(Xpath).clear()
|
||||
sleep, 500
|
||||
|
||||
Try CurrentValue := driver.findelementbyxpath(Xpath).Attribute("value") ;Xpath Value
|
||||
|
||||
if(PreviousValue != CurrentValue){
|
||||
break
|
||||
}
|
||||
|
||||
sleep, 1000
|
||||
; msgbox
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
; ToolTip, Loop attempt: %A_index%
|
||||
try driver.FindElementByXPath(Xpath).sendKeys(StringTextContent) ; Click on "upload image" button
|
||||
try driver.FindElementByXPath(Xpath).sendKeys(StringTextContent) ; Input Text
|
||||
catch e {
|
||||
if(A_index = NumOfLoops){
|
||||
Return "Failed"
|
||||
|
||||
@@ -11,8 +11,11 @@ CheckForUpdates:
|
||||
Message = Checking for Updates
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
if(CheckForUpdates(GitReleasesAPIURL))
|
||||
GuiControl,,UpdateAvailable, Uploader Update Available!
|
||||
|
||||
if(CheckForUpdates(GitReleasesAPIURL)){
|
||||
GuiControl,,UpdateAvailable, Update Available!
|
||||
|
||||
}
|
||||
|
||||
if(CheckForChromeUpdates(ChromeFilepath)){
|
||||
GuiControl,,ChromeUpdateAvailable, Chrome Update Available!
|
||||
|
||||
Reference in New Issue
Block a user