Skip to content
Advertisement

Removing specific word from WebElement text

Hello I am scraping a website using selenium which has a button named view profile whenever i scrape it shows me the text of button in my output because it’s under the same <div> that I am scraping data from like

JavaScript

my code

JavaScript

its ouput

JavaScript

Is there any way I can remove that view profile text or stop it from printing?

Thanks

Advertisement

Answer

You can get the text of the button alone and remove it

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement