Skip to main content
Solved

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

  • May 12, 2023
  • 1 reply
  • 1223 views

Forum|alt.badge.img

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.

Best answer by Chandrasekhar 7496

you have to use

document.getElementById("id").innerHTML;

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

View original
Did this topic help answer your question?

1 reply

Chandrasekhar 7496
Forum|alt.badge.img+5

you have to use

document.getElementById("id").innerHTML;

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings