While working on building a test case, I encountered a problem with a search text box on my web page. The Selenium IDE was used to record the actions taken.
type | id=search_input_char_name_136 | myproduct // textbox for search
click | css=button.oe_button | - // search icon click
Upon recording, I noticed that in the "type" action, an ID value is provided for the textbox. However, when using the same ID value during testing, it resulted in an id not found error
. Further investigation revealed that the ID is dynamic and changes each time.
After researching, it seems like using XPath could be the solution. As someone new to Selenium and XPath, I am struggling to find the right syntax. Can someone help me by providing the XPath syntax to target the ID of the search text box?