Reputation: 101
I don't want to use selenium since I dont want to open any browsers.
The button triggers a Javascript method that changes something in the page. I want to simulate a button click so I can get the "output" from it.
I enter a name such as "John", press the button and it changes "John" to "nhoJ". so I already managed to change the value of the input to John but I have no clue how I could simulate a button click so I can get the output.
Thanks.
Upvotes: 0
Views: 7676
Reputation: 3699
BeautifulSoup is an HtmlParser
you can't do such thing. Buf if that button calls an API, you could make a request
to that api and I guess that would simulate clicking the button.
Upvotes: 1
Reputation: 386372
You can't do what you want. Beautiful soup is a text processor which has no way to run JavaScript.
Upvotes: 4