package seleniumdemo;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.firefox.FirefoxDriver;
public class TestDay01 {
public static void main(String[] args) {
// TODO Auto-generated method stub
FirefoxDriver driver=new FirefoxDriver();
driver.get("https://www.hczhifu.com/");
driver.findElement(By.cssSelector("div.double_Btn>a:nth-child(1)")).click();
driver.manage().timeouts().implicitlyWait(5000, TimeUnit.SECONDS);
driver.findElement(By.cssSelector("#userName")).sendKeys("1234567");
//修改不可见元素为可见
String js = "document.getElementById('password').style.display='block';";
((JavascriptExecutor)driver).executeScript(js);
driver.findElement(By.cssSelector("#password")).sendKeys("123456");
}
}