selenium - xpath locator not work as expected to locate a "<a" element with compound class name -



selenium - xpath locator not work as expected to locate a "<a" element with compound class name -

this line not work think have used right xpath?

driver.findelement(by.xpath("//a[contains(@class,'cke_button_bold')]")).click();

to locate button below :

<a id="cke_73" class="cke_off cke_button_bold">

id dynamic number can used fixed locator here. , class compound class not supported webdriver findelement method...

i created simple html file , xpath works firefoxdriver in webdriver 2.1.0. can seek use

driver.findelement(by.classname("cke_button_bold"))

classname supported webdriver api

xpath selenium webdriver

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -