added title input for Locals Posts

main
Yuriy 1 year ago
parent e67b80a2d8
commit 5ed47d281c

@ -41,12 +41,22 @@ if(InStr(CurrentTabURL, "/login") OR InStr(CurrentTabURL, "/register")){
Message = Inputting Post Content Message = Inputting Post Content
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
Xpath = //input[@id='title']
try driver.FindElementByXPath(Xpath).click()
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PostTitle)
if(Status){
Message = Failed to input Title
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
SaveDriverURLOFErrorPage()
Return
}
Xpath = //*[@id="body"] Xpath = //*[@id="body"]
try driver.FindElementByXPath(Xpath).click() try driver.FindElementByXPath(Xpath).click()
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PostTitleAndBody) Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PostBody)
if(Status){ if(Status){
Message = Failed to input Title Message = Failed to input Body
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
SaveDriverURLOFErrorPage() SaveDriverURLOFErrorPage()
Return Return
@ -79,23 +89,6 @@ if(ImageAttachmentFilepath != ""){
Message = Submitting Post Message = Submitting Post
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
/* ; Click the final "post" button
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
Status := Selenium_LoopToClickName(ElementName:="submitPost",NumOfLoops:=5,SleepLength:=1000)
if(Status){
Message = Failed to Submit Post
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
*/
; msgbox
; @todo: add error check into here to check the current page url and after page url
; Click Publish post ; Click Publish post
js = document.getElementsByName('submitPost')[0].click(); ; Send content through javascript (Great for getting around emoji chrome limitaitons) js = document.getElementsByName('submitPost')[0].click(); ; Send content through javascript (Great for getting around emoji chrome limitaitons)
try driver.executeScript(js) try driver.executeScript(js)

Loading…
Cancel
Save