Solved

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

  • 12 May 2023
  • 1 reply
  • 786 views

Badge

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.

icon

Best answer by Chandrasekhar 7496 12 May 2023, 17:37

View original

1 reply

Userlevel 3
Badge +5

you have to use

document.getElementById("id").innerHTML;

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

Reply