Added workaround to fix Subscribestar broken Hyperlink inputting.
This commit is contained in:
@@ -146,14 +146,37 @@ sleep, 500
|
|||||||
driver.FindElementByXPath(Xpath).SendKeys("`n`n")
|
driver.FindElementByXPath(Xpath).SendKeys("`n`n")
|
||||||
sleep, 500
|
sleep, 500
|
||||||
|
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PostBody)
|
if(InStr(PostBody, "http")){
|
||||||
if(Status){
|
StrLengthOfPost := StrLen(PostBody)
|
||||||
|
|
||||||
|
SaveOrPostProgress(Message:="Body has hyperlink, Inputting text key by key",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
Loop % StrLengthOfPost{
|
||||||
|
|
||||||
|
Current_Char := SubStr(PostBody, A_index, 1)
|
||||||
|
|
||||||
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=20,StringTextContent:=Current_Char)
|
||||||
|
if(Status){
|
||||||
|
Message = Failed to Input Text
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
SaveDriverURLOFErrorPage()
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
SaveOrPostProgress(Message:="Body has no hyperlink, inputting entire text body into element.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PostBody)
|
||||||
|
if(Status){
|
||||||
Message = Failed to input Post Body
|
Message = Failed to input Post Body
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
SaveDriverURLOFErrorPage()
|
SaveDriverURLOFErrorPage()
|
||||||
Return
|
Return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
; check if value was input
|
; check if value was input
|
||||||
js = return document.querySelector("trix-editor[role='textbox']").innerText
|
js = return document.querySelector("trix-editor[role='textbox']").innerText
|
||||||
try, Status := driver.executeScript(js)
|
try, Status := driver.executeScript(js)
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
[Social-Media-Poster]
|
[Social-Media-Poster]
|
||||||
Version=2.95
|
Version=2.96
|
||||||
|
|||||||
Reference in New Issue
Block a user