import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;

import org.openqa.selenium.chrome.ChromeDriver;



public class demo {



public static void main(String[] args) {

// TODO Auto-generated method stub

WebDriver dr;

System.setProperty("webdriver.Chrome.mariontte","C:\\driver\\chromedriver.exe");

dr= new ChromeDriver();

dr.get("http://mail.10086.cn");

dr.manage().window().maximize();

//dr.get(Context_variables.url);

WebElement username = dr.findElement(By.id("txtUser"));

WebElement pwd = dr.findElement(By.id("txtPass"));

WebElement Btn = dr.findElement(By.id("cbauto"));

WebElement login = dr.findElement(By.id("loginBtn"));

username.sendKeys("账号");

pwd.sendKeys("密码");

Btn.click();

login.click();



}



}

最新文章

  1. 创建django项目
  2. Tomcat下使用war包发布项目
  3. 苹果开发者账号如何多人协作进行开发和真机调试XCode
  4. python递归小疑惑
  5. appium的xpath定位
  6. [Java Code] 时间维度循环生成代码片段
  7. Balanced Numbers(数位+状压)
  8. 实现VS2010整合NUnit进行单元测试
  9. 一步步优化JVM二:JVM部署模型和JVM Runtime
  10. Struts2基础学习(八)—Struts2防止表单重复提交
  11. spring boot / cloud (七) 使用@Retryable来进行重处理
  12. RabbitMQ权限控制原理
  13. spring 框架学习网站
  14. MySQL学习(五) UNION与UNION ALL
  15. windows模拟linux部分功能
  16. ajax hash缓存
  17. Service 保活法之二
  18. 好用的 FTP 软件之 FileZilla 技巧教程
  19. 【mysql】mysql中单列索引、联合索引、Join联表查询建立索引 和 EXPLAIN的分析使用
  20. 浅析promise

热门文章

  1. Apache Maven的下载、安装、测试
  2. hdu-3592 World Exhibition(差分约束)
  3. [SHOI 2013] 发微博
  4. Balancing Act(树的重心)
  5. JS 之正则表达式
  6. docker使用问题
  7. View Controller Programming Guide for iOS---(六)---Responding to Display-Related Notifications
  8. html中target的用法
  9. 从ao神处偷取的头文件
  10. bzoj 5019: [Snoi2017]遗失的答案【dp+FWT】