Selenium Python – extract Javascript as string

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) {
    
  }
}

15 thoughts on “Selenium Python – extract Javascript as string”

Leave a Comment