RE: HTML ids are case sensitive??

in my project in reports there is Role drop down box. this drop down box present in multiple reports with id’s below.
1. ctl00_ContentPlaceHolder1_scopePanel_role_AutoRadComboBox_DropDown
2. ctl00_ContentPlaceHolder1_scopePanel_Role_AutoRadComboBox_DropDown
If you observe carefully then their is difference of  one character (r & R) in first id its small and second id its capital. due to this i need to write another method for same. instead of this i need to handle it in same method. please help me in this.

amith Default Asked on June 14, 2016 in Selenium WebDriver.

Hi Amith,

You can use input[starts-with(@id,’ctl00_ContentPlaceHolder1′)] in your XPATH


on June 22, 2016.
Add Comment
1 Answers

Hi Amith,

Basic idea of having ID is to keep unique identifier for each element,  i don’t think the implementation you are trying will work in longer run, try to write separate method for such operation.
even if you try to handle this you can’t be sure how many and which exact character to handle.


Default Answered on June 15, 2016.

Thanks for reply…its not make sense to write multiple methods for that drop down appears at different locations because we have hundreds of report… can we use regular expression/Pattern matching here …if yes then please let mi know how?


on June 15, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.