Java 操作chrome

1、下载 chromedriver.exe

2、添加依赖

<dependency>
	<groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
	<version>2.44.0</version>
</dependency>

3、

System.setProperty("webdriver.chrome.driver",
				"src/test/java/chromedriver.exe");
		ChromeDriver driver = new ChromeDriver();
		
		driver.get("http://www.baidu.com/ ");

		// Find the text input element by its name

		// Check the title of the page
		System.out.println("Page title is: " + driver.getTitle());










转载于:https://my.oschina.net/liyonglee/blog/358150

已标记关键词 清除标记
表情包
插入表情
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页