- Question:
I have 8 buttons like (discover,news,people,videos,sport,tech,offbeat,ents). so i want to click on any one or more buttons. actually i don't know what to use here, i was thinking if else will work. need some help. Here there is a problem which i feel is, all buttons have same class name so how to use if else for this type of issue.
if(!driver.findElement(By.className("default button ")).isSelected())
{
driver.findElement(By.className("default button")).sendKeys("discover");
}
else
{
driver.findElement(By.className("default button")).sendKeys("news");
}
- Question:
I have 8 tags as drop downs like (discover,news,people,videos,sport,tech,offbeat,ents). so i want to select only any one tag. how do i use if else statements for this...
thanks in advance !!
Aucun commentaire:
Enregistrer un commentaire