diff --git a/Modules/Podcast-Upload.ahk b/Modules/Podcast-Upload.ahk index b4e7061..1a3eb28 100644 --- a/Modules/Podcast-Upload.ahk +++ b/Modules/Podcast-Upload.ahk @@ -122,9 +122,17 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") Xpath = //input[@id='email'] Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=Username) +; Selenium can't clear out text that's prepopulated by chrome or a password manager until we send some input to the element +; So we input text, then clear it and then input the string we want to work around this. +try, driver.findelementbyxpath(Xpath).clear() ; clear input field in case it's autofilled by chrome or password manager +Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=Username) + if(!Status){ ; if inputting email did NOT fail, then we are on the login page, input the password and then click login. Xpath = //input[@id='password'] Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=Password) + try, driver.findelementbyxpath(Xpath).clear() ; clear input field in case it's autofilled by chrome or password manager + Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=Password) + Xpath = //a[@id='loginButton'] Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000) @@ -271,13 +279,15 @@ ArrayOfPodcastTags := StrSplit(Podcasttags,",") LengthOfArrayOfPodcastTags := ArrayOfPodcastTags.Length() ; Save total number of items in the array try pagehtml := driver.pagesource -; Msgbox % "pagehtml: " pagehtml + + Loop, %LengthOfArrayOfPodcastTags% { Tag := ArrayOfPodcastTags[A_Index] ; find value from position in array SpanID = title">%Tag%