driver.findElement (By.partialLinkText("timelog")).click();
driver.findElement(By.cssSelector("span.sti-icon sti-icon-timelog sti-item")).click();
driver.findElement(By.xpath("//span[@class = 'sti-icon sti-icon-timelog sti-item']")).click();
but getting error - unable to locate element.
can anybody help me?
Steffi.
Hello,
Assuming these xpaths point to an unique element,
driver.findElement (By.partialLinkText("timelog")).click();
I think this should be TIMELOG instead of timelog?
driver.findElement(By.cssSelector("span.sti-icon sti-icon-timelog sti-item")).click();
This one is wrong because classes need to be separated by a dot character.
Use span.sti-icon.sti-icon-timelog.sti-item
driver.findElement(By.xpath("//span[@class = 'sti-icon sti-icon-timelog sti-item']")).click();
This is wrong syntax. It should be //span[contains(@class,'classname1' and contains(@class, 'classname2')]
Regards,
Praveen
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b5ba9d79-b509-42f2-be56-d96131eaf774%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.