I am trying to target specific CSS elements on a page, but the problem is that they have varying selector names. For instance, input#dp156435476435.textinput.wihtinnextyear.datepicker.hasDatepicker.error. I need to target the CSS because i am specifcally looking for the .error at the end of the element, and that is only in the CSS (testing error validation for fields on a website. I know if I was targeting class/name/href/id/etc, I could use xpath, but I'm not aware of a partial CSS selector in selenium webdriver. Any help would be appreciated, thanks!
-
Have you considered just iterating through the entire document tree and testing each element for your CSS attribute?GVH– GVH2014-02-13 21:16:33 +00:00Commented Feb 13, 2014 at 21:16
Add a comment
|