标签:repos get cti 简单 win imp ble cli one
java<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.0.0-beta1</version>
<scope>compile</scope>
</dependency>
ChromeDriver driver = new ChromeDriver();
driver.navigate().to("http://www.baidu.com");
Thread.sleep(6000);
driver.close();
driver.findElement(By.id("kw")).sendKeys("百度");
from selenium import webdriver
driver = webdriver.Firefox(executable_path=‘D:\pythonspacen\pyt\onea\drive\geckodriver.exe‘)
driver.maximize_window()
driver.get("http://www.baidu.com")
driver.find_element_by_id("kw").send_keys("美丽")
driver.find_element_by_xpath(‘//*[@id="su"]‘).click()
标签:repos get cti 简单 win imp ble cli one
原文地址:https://blog.51cto.com/357712148/2374747