Hi Jahmal, what should I do if a web element does not contain id? Are there any other reliable substitute selectors?
@amenamabrouk Жыл бұрын
Use these XPath locators instead. Just change out the text value for each element on the contact page. // first name WebElement firstNameTxtBox = driver.findElement(By.xpath("//*[@text='First name']")); // last name WebElement lastNameTxtBox = driver.findElement(By.xpath("//*[@text='Last name']")); // phone WebElement phoneTxtBox = driver.findElement(By.xpath("//*[@text='Phone']"));