Question

Browser : Run Javascript throwing error. An Unexpected error has occured. null

  • 9 March 2022
  • 4 replies
  • 31 views

Hi All,

 

I am trying to login to a website having microsoft login page but I'm facing some issues when I try to click "Any Other account". I've tried couple of ways but it's not working, Kindly refer to below details and help if you have faced this before.

 

I am able to capture the element using Recorder package and it works fine when i run only that capture line but when i run from start (launching browser and other steps) this click fails to perform and throws and error (screenshot attached) that CLIENT not found.

 

I have also attached capture properties for your reference and how the login page looks like.

 

I tried using Javascript for this click but it throws me an error saying An Unexpected error occured Null.

 

I used Browser : Run Javascript command (screenshot attached). The script works fine in console but not using A360.

 

I can't use keystrokes because the number of accounts present would not be static so I can't count number of TABS, i'll have to pass to reach to last option.

 

Thank you

 

 

 


4 replies

Userlevel 3
Badge +7

Hi @Rishabh Malhotra​ ,

 

For the Other Account button, could you try ReCapturing object using the Capture Action, disable all object properties except the DOMXpath and pass this into the DOMXpath?

 

//div[@id='otherTileText']

 

Kind Regards,

Ashwin A.K

Hey @Ashwin A.K​ ,

 

I tried this but no success, It still throws me an error.

 

I get this error only when I do an end to end run, when i start from this action it works fine in clicking it. Earlier I thought it's because of delay or page has not loaded so I gave delay, a huge one too but still it fails to click on Other account during end to end run.

 

Please let me know if you have any other suggestions

 

Best Regards,

Rishabh

Hi @Rishabh Malhotra​ ,

Did you ever solve for this? I am having the same issue - both Capture and Browser/Javascript have the same results.

Userlevel 4
Badge +8

Hi,

 

From A360.25 version onwards there is an option to capture the object using different technologies.

Test this with MSAA/Standard technology and it should work absolutely fine.

 

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/capture-using-specific-technology.html/p>

 

Any questions please ask.

 

Reply