本项目在IDEA运行,基于JDK1.8,需要自行导入selenium和json的jar包。 浏览器驱动为Chrome,根据自己的driver位置修改main函数中的driver位置。
Selenium 1中测试工程师使用Selenium IDE录制开发对应的测试脚本,但在WebDriver中,仅需引入对应的API,即可利用Java或Python等语言开发工具进行测试脚本开发,Selenium IDE渐渐被放弃。 利用Selenium进行Web自动化测试时,可采用Python语言,Python常用的开发平台为PyCharm。
Launch the browser and open “Gmail.com”. Verify the title of the page and print the verification result. Enter the username and Password. Click on the Sign in button. Close the web browser. Step 1: ...