在这里我写了一些代码行。.我想验证每行都必须是强制性的。.如果我没有在任何字段中输入数据并单击提交,它将显示“必填字段”。
System.setProperty("webdriver.chrome.driver", "C:\\Users\\UMASHANKAR\\Documents\\selenuim\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.manage().window().maximize();
//在此处查找所有元素
driver.get("https://ecabportal.azurewebsites.net/addDriver");
driver.findElement(By.id("name")).sendKeys("divya");
driver.findElement(By.name("countrycode")).sendKeys("");
driver.findElement(By.id("phone"));
driver.findElement(By.id("email"));
driver.findElement(By.id("license"));
driver.findElement(By.id("address"));
driver.findElement(By.name("city"));
driver.findElement(By.name("state"));
driver.findElement(By.name("country"));
driver.findElement(By.name("pincode"));
driver.findElement(By.name("Save"));
Select data=new Select(driver.findElement(By.name("docName")));
data.selectByVisibleText("Voter ID");
now i need to validate help me how..