Locate element by partial class name

4,086 views
Skip to first unread message

Santosh Hulisandra Srikanta

unread,
Sep 26, 2013, 9:36:25 AM9/26/13
to seleniu...@googlegroups.com
How to locate elements by partial class name in web-driver.
I have list html elements whose name starts with "selectItem".
So i want list all these elements using drive.find_elements_by_class_name().
Please let me know how to do this.

I found regex can be used for Xpath but i need to use regex for class names,
Please help me out here


Regards
Santosh

praveenreddy narala

unread,
Sep 26, 2013, 10:35:25 AM9/26/13
to seleniu...@googlegroups.com
Santosh,
Please go through this link, I think it might be helpfull for you :)
 
 

 

shuklasa...@gmail.com

unread,
Sep 27, 2013, 4:23:29 AM9/27/13
to seleniu...@googlegroups.com
You Can use some css selectors like  tagname[@classname^=""];

Santosh Hulisandra Srikanta

unread,
Sep 27, 2013, 8:43:43 AM9/27/13
to seleniu...@googlegroups.com
Cant i use something like drive.find_elements_by_class_name() with some regex instead of CSS or class name


--
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/448cf032-94bd-4493-8bd8-87c7f46dcf1c%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
ಎಲ್ಲಾದರೂ ಇರು ಎಂತಾದರು ಇರು 
ಎಂದೆಂದಿಗೂ ನೀ ಕನ್ನಡವಾಗಿರು 
ಕನ್ನಡವೇ  ಸತ್ಯ  ಕನ್ನಡವೇ  ನಿತ್ಯ 

/ ಸಂತೋಷ್  
Reply all
Reply to author
Forward
0 new messages