Skip to main content
Cadet | Tier 2
April 19, 2023
Question

Capture javascript alert on chrome

  • April 19, 2023
  • 5 replies
  • 643 views

Is there a way to capture the text of a “vanilla” javascript alert on Google Chrome, like on the image below?

 

 

I need to capture “example text” but the capture action (even with the alternate capturing methods) can only get the title “community.automationanywhere.com diz”

 

This kind of capture works fine on Edge and Firefox, but I need it on Chrome.

    5 replies

    rbkadiyam
    Premier Pathfinder | Tier 7
    Premier Pathfinder | Tier 7
    April 19, 2023

    @lhishivatari  Have you tried capture with COM option ?

    Ramesh B Kadiyam
    Cadet | Tier 2
    April 19, 2023

    @lhishivatari  Have you tried capture with COM option ?

    Yes, I have tried with

    • Auto detect
    • Microsoft Active Accessibility
    • Microsoft UI Automation
    • Microsoft UI Automation (COM)

    None of them work

    Andoni_1
    Navigator | Tier 3
    Navigator | Tier 3
    September 15, 2023

    @lhishivatari how did you handle it?

    Cadet | Tier 2
    September 15, 2023

    @lhishivatari how did you handle it?

    Not the ideal solution but I used OCR.

     

    As long as the window is always maximized, the javascript message will always show up on the same position.

    The Recorder → Capture can’t get the message reliably, but it can capture its X, Y, Width and Height.

    With those values in hand, I used OCR: Capture area and it works very well

     

     

    Cadet | Tier 2
    November 9, 2023

    Using the Recorder, instead of the “Get property” action, try using “Get all children names” which should give you the message.