- Darknet
- Posts : 3
Join date : 2016-04-11
I can onliy click on the first class Element
Sat Jul 07, 2018 12:22 am
Selenium click onliy te first Class Element. How can i click on the others? after that?
int IDENT = 0;
while(IDENT < 1)
{
IDENT++;
driver.findElement(By.xpath("//div[@class=\"price\"]["+IDENT+"]")).click();
}
int IDENT = 0;
while(IDENT < 1)
{
IDENT++;
driver.findElement(By.xpath("//div[@class=\"price\"]["+IDENT+"]")).click();
}
Re: I can onliy click on the first class Element
Tue Jul 10, 2018 6:45 pm
Please share the full XML which you are trying to do. If your XPath is correct and in a sequential manner, it must click.
I think , you are trying to click these:
//div[@class="price"][1].click()
//div[@class="price"][2].click()
//div[@class="price"][3].click()
But chances are something changes, which are not recognizing your XPath.
I think , you are trying to click these:
//div[@class="price"][1].click()
//div[@class="price"][2].click()
//div[@class="price"][3].click()
But chances are something changes, which are not recognizing your XPath.
- Which value should I define, to let selenium to click on all checkboxes, which have a specific css-class?
- how to identify element using xpath having same class names?
- How to pass XPATH as an argument in Robot class to locate an element
- Query - Not able to click on element
- Need suggestion for multiple element click
Permissions in this forum:
You cannot reply to topics in this forum