Skip to main content
Question

Capture javascript alert on chrome

  • April 19, 2023
  • 5 replies
  • 548 views

Forum|alt.badge.img+1

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
Forum|alt.badge.img+17
  • Premier Pathfinder | Tier 7
  • 625 replies
  • April 19, 2023

@lhishivatari  Have you tried capture with COM option ?


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 2 replies
  • 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
Forum|alt.badge.img+10
  • Navigator | Tier 3
  • 85 replies
  • September 15, 2023

@lhishivatari how did you handle it?


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 2 replies
  • 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

 

 


Forum|alt.badge.img+10
  • Cadet | Tier 2
  • 8 replies
  • November 9, 2023

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