Added workaround to fix Subscribestar broken Hyperlink inputting.
This commit is contained in:
@@ -146,13 +146,36 @@ sleep, 500
|
||||
driver.FindElementByXPath(Xpath).SendKeys("`n`n")
|
||||
sleep, 500
|
||||
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PostBody)
|
||||
if(Status){
|
||||
Message = Failed to input Post Body
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
SaveDriverURLOFErrorPage()
|
||||
Return
|
||||
if(InStr(PostBody, "http")){
|
||||
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
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
SaveDriverURLOFErrorPage()
|
||||
Return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
; check if value was input
|
||||
js = return document.querySelector("trix-editor[role='textbox']").innerText
|
||||
|
||||
Reference in New Issue
Block a user