I am trying to automate the process of updating my NameCheap API IP Address using this bada$$ new tool from Microsoft, but when I get to the One-Time-PIN authentication for the login, after opening an input field for the OTP and pressing enter or the OK button, the field is not recognized any longer, breaking the automated login process. The Error that I get is:
"Form field with selector 'html > body > fragment:eq(1) > fragment-app-589adf22 > div > form > div > div > div > div:eq(0) > div > input' not found."
I have entertained the idea of getting the OTP before logging in, but this could cause a problem due to the fact that it is a time-based password. Any ideas of how to solve this?
My Flow follows (With Username, password, and screenshots removed for privacy)
@@flowname: 'Get_External_IP'
External.RunFlow FlowId: 'fdced696-193e-4cfc-9d67-c1db482337ef' @External_IP_Address=> External_IP_Address
# Start of autogenerated actions using the web recorder
@@timestamp: '11/18/2021 01:04:59'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.LaunchFirefox.LaunchFirefox Url: 'https://www.namecheap.com/' BrowserInstance=> Browser
@@timestamp: '11/18/2021 01:05:08'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.PressButton.PressButton BrowserInstance: Browser Control: appmask['Recording']['button']
@@timestamp: '11/18/2021 01:05:10'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.PopulateTextField.PopulateTextField BrowserInstance: Browser Control: appmask['Recording']['input'] Text: 'MYPASSWORD' Mode: WebAutomation.PopulateTextMode.Replace
@@timestamp: '11/18/2021 01:05:12'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.PopulateTextField.PopulateTextField BrowserInstance: Browser Control: appmask['Recording']['input 2'] Text: 'MYUSERNAME' Mode: WebAutomation.PopulateTextMode.Replace
@@timestamp: '11/18/2021 01:05:12'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Recording']['span']
@@timestamp: '11/18/2021 01:05:12'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.PressButton.PressButton BrowserInstance: Browser Control: appmask['Recording']['button 2']
Display.InputDialog Title: $'''One-Time PIN''' Message: $'''Enter the OTP value''' InputType: Display.InputType.Password IsTopMost: True UserInput=> OTP ButtonPressed=> ButtonPressed
# CURRENTLY UNABLE TO TYPE THE OTP ENTERED FROM PREVIOUS COMMAND INTO FIELD.
WebAutomation.PopulateTextField.PopulateTextFieldCloseDialog BrowserInstance: Browser Control: appmask['Recording']['input 3'] Text: OTP EmulateTyping: True UnfocusAfterPopulate: False Mode: WebAutomation.PopulateTextMode.Replace
@@timestamp: '11/18/2021 01:06:03'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.PressButton.PressButton BrowserInstance: Browser Control: appmask['Recording']['button 3']
@@timestamp: '11/18/2021 01:06:09'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Recording']['a']
@@timestamp: '11/18/2021 01:06:13'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Recording']['span 2']
@@timestamp: '11/18/2021 01:06:16'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.PressButton.PressButton BrowserInstance: Browser Control: appmask['Recording']['button 4']
@@timestamp: '11/18/2021 01:06:20'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Recording']['a 2']
@@timestamp: '11/18/2021 01:06:26'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Recording']['td']
@@timestamp: '11/18/2021 01:06:32'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.GetDetailsOfElement BrowserInstance: Browser Control: appmask['Recording']['td'] AttributeName: 'innertext' AttributeValue=> innertext
IF innertext <> External_IP_Address THEN
@@timestamp: '11/18/2021 01:06:57'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Recording']['a 3']
WebAutomation.PopulateTextField.PopulateTextField BrowserInstance: Browser Control: appmask['Recording']['input 4'] Text: External_IP_Address EmulateTyping: True UnfocusAfterPopulate: False Mode: WebAutomation.PopulateTextMode.Replace
@@timestamp: '11/18/2021 01:07:39'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.PopulateTextField.PopulateTextField BrowserInstance: Browser Control: appmask['Recording']['input 5'] Text: 'MYPASSWORD' Mode: WebAutomation.PopulateTextMode.Replace
@@timestamp: '11/18/2021 01:07:39'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.PressButton.PressButton BrowserInstance: Browser Control: appmask['Recording']['button 5']
Display.ShowMessageDialog.ShowMessageWithTimeout Title: $'''IP Address Updated''' Message: $'''The NameCheap API Address was not a match, but was updated to the current External Address of : %External_IP_Address%''' Icon: Display.Icon.Information Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: True Timeout: 3 ButtonPressed=> ButtonPressed3
ELSE
Display.ShowMessageDialog.ShowMessageWithTimeout Title: $'''Current IP Address''' Message: $'''The current External IP Address matches. No need to change.''' Icon: Display.Icon.Information Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: True Timeout: 3 ButtonPressed=> ButtonPressed2
END
@@timestamp: '11/18/2021 01:07:49'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Recording']['a 4']
@@timestamp: '11/18/2021 01:07:52'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Recording']['a 5']
@@timestamp: '11/18/2021 01:07:55'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Recording']['a 6']
@@timestamp: '11/18/2021 01:07:57'
@@source: 'Recorder'
@@recordertype: 'Web'
@@culture: 'en-US'
WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Recording']['span 3']
# End of autogenerated actions using the web recorder
# [ControlRepository][PowerAutomateDesktop]