I am currently using an xpath to check if the id and placeholder match:
I have written this xpath, however I am having issues with escapes. I am not sure how to approach this
self.driver.find_element_by_xpath("//input[@id="searchvalue" and @placeholder="Searched for: L1-Multi-level Combo contains \'Corporate\General Counsel's Office (GCO)\'"]").click()
This is how my HTML code looks like:
<input type="text" name="searchvalue" id="searchvalue" placeholder="Searched for: L1-Multi-level Combo contains 'Corporate\General Counsel's Office (GCO)\'" label="Search" title="Searched for: L1-Multi-level Combo contains 'Corporate\General Counsel's Office (GCO)\'" class="uneditable-inputRight searchtext" onkeypress="if((event&&event.which==13)||(window.event&&window.event.keyCode==13)){quickSearchArcadia(gbappid, false, gbentity);}" onfocus="showSearchOptions()">