• Home
  • Jobs
  • Courses
  • Questions
  • Teachers
  • For business
  • ES/EN

0

2
Views
why selenium's execute_script doesn't work?

This is my test page: http://121.41.14.39:8088/index.html#/

This is my test code

from selenium import webdriver
driver = webdriver.Chrome()
driver.get('http://121.41.14.39:8088/index.html#/')
js1 = 'document.getElementById("username").value="sq99"'
js2 = 'document.getElementById("password").value="123"'
js3 = 'document.getElementById("code").value="999999"'
js4 = 'document.getElementById("submitButton").click()'
driver.execute_script(js1)
driver.execute_script(js2)
driver.execute_script(js3)
driver.execute_script(js4)

It didn't login the system. So i try to excute ths js code manually. It also fails. The Picture

I test the similar code on the other website , it may works sometime but fails sometimes. How can i make it successfully?I think it caused by the web,but i don't know where...

about 1 month ago ·

Juan Pablo Isaza

Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.