fixed Subscribestar title and body having same formatting

main
Yuriy 11 months ago
parent 038bbdf9fa
commit 600481a517

@ -125,11 +125,30 @@ if(Status){
; Input Text into pop-up edit box
SaveOrPostProgress(Message:="Inputting Post Content",PostType:="Tooltip,ErrorLoggingTextFile")
SubscribeStarJSDescription := FormatTextToJSText(PostTitleAndBody)
js = document.querySelector("trix-editor[role='textbox']").value = "%SubscribeStarJSDescription%";
try driver.executeScript(js) ;Executes a Javascript on the webpage, mostly used for buttons.
catch e {
Message = Failed to Input Post Contents (E#8281)
; click on heading format button
Xpath = //button[@title='Heading']//i
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
sleep, 500
Xpath = //trix-editor[@role='textbox']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PostTitle)
if(Status){
Message = Failed to input Post Title
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
SaveDriverURLOFErrorPage()
Return
}
; driver.FindElementByXPath(Xpath).SendKeys(PostTitle)
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
@ -146,7 +165,7 @@ if(!Status){
else, { ; if input successfully, post to error log
String := SubStr(Status, 1, 30)
Message = Post Content that got input: %String% ...
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
}

Loading…
Cancel
Save