Reputation: 37
Can I extract JavaScript code using Python Selenium, In other words, i need the js code as string
function validateForm() {
var x = document.forms["myForm"]["Password"].value;
if (x.length >= 6) {
}
}
Upvotes: 0
Views: 161
Reputation:
you can use BeautifulSoup
soup = BeautifulSoup(response.content,'html.parser')
script_code = soup.find('script')
Upvotes: 1