python
来源:互联网 发布:矩阵双竖线 编辑:程序博客网 时间:2024/06/15 18:12
操作浏览器的api:
Driver.navigate().refresh()
Driver.navigate().forward()
Driver.navigate().back()
Driver.getTitle()
Driver.getCurrentUrl()
Driver.getmanage().window().maxmize()
Driver.quite()
Driver.close()
输入框操作api:
Sendkeys()
Clear()
getTest()
Click()
在java中引入Selenium WebDriver实现自动化
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.*;
public class BaiduTest{
public static void main(String[] args){
webDriver driver=new FirefoxDriver();
driver.get(“http://www.baidu.com“);
driver.findElement(By.id(“kw”)).sendKeys(“selenium2”);
}
}
0 0
- Python
- Python
- Python
- python
- Python
- PYTHON
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- python
- Python
- 用过的STM8和STM32型号参数
- Log4j2记录日志到数据库(MySQL&MongoDB)
- 后台学习之路(五)-mysql(运算符和函数)
- 新开博客第一天20170207
- Button 设置半圆角和阴影
- python
- 使用 Realm 和 Swift 创建 ToDo 应用
- 如何用正确姿势学习获得OpenResty
- 11
- 【博弈论】SRM701PartisanGame
- 基类指针指向派生类对象和隐式转换
- 免费馅饼 [dp]
- sandboxie (沙箱机制)
- 【Android实战】----从Activity入手(编写BaseActivity)