See the forum someone wrote the Java test code of the daily design, to share with you how I usually test the test
The. Code is primarily based on the Python language. Daily debugging based on Webdriver is very handy in Python interactive mode,
Open Python has interactive mode:
Web-side Example:
From selenium import Webdriver
Dr=webdriver. Chrome ()
Dr.get (' http://cn.bing.com ')
dr.find_element_by_id ("Sb_form_q"). Send_keys ("Wo")
dr.find_element_by_id ("Sb_form_q"). Send_keys ("ni")
Python does not need tools to have a natural edge.
Mobile-Appium Instances
From Appium import Webdriver
desired_caps={}
desired_caps["PlatformName"]= "Android"
desired_caps["Platformversion"]= "4.2.2"
desired_caps["DeviceName"]= "192.168.245.101:5555"
desired_caps["Apppackage"]= "Com.android.calculator2"
desired_caps["Appactivity"]= ". Calculator "
Dr=webdriver. Remote ("Http://127.0.0.1:4723/wd/hub,desired_caps")
Dr.find_element_by_name ("1"). Click ()
Dr.find_element_by_name ("5"). Click ()
Webdriver-based test code daily debug Party Python Chapter