Skip to main content
Solved

How to extract text from a website using Browser: Run JavaScript activity in AA 360 community edition?

  • 12 May 2023
  • 1 reply
  • 916 views

Hi Team, Could you please tell me How to extract text from a website using the Browser: Run JavaScript activity in AA 360 community edition? I was trying to extract text from an element in a website by using the JS code - document.querySelector('.my-paragraph').textContent. I tried this code in the Browse: Run JavaScript Activity, but it wasn't executing.
I kindly appreciate it if someone could help me.

Thanks.

1 reply

Userlevel 3
Badge +5

you have to use

document.getElementById("id").innerHTML;

your code should be :- document.querySelector('.my-paragraph').innerHTML;

Reply