Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

How would I locate / click the following element in Selenium IDE? The text "Sample XYZ5" is dynamically generated. So is the value 99999.

<td>

<input type="checkbox" value="99999" name="sample[]">

Sample #XYZ5

</td>

share|improve this question

1 Answer 1

The Selenium IDE normally has a recording function. With this function you should be able to record a click on your element. Then you only have to watch how the IDE records it.

But if you want to click on it using some other frameworks (like creating an automatic test in Java or Python or...) you should use XPaths to locate the element. But be aware of your XPath combination because if the element doesn't have an ID it's a little bit tricky to get a unique XPath.

share|improve this answer
    
Yes - I'm looking for possible xpath settings for the above HTML. The 'Record' capability has not worked for this situation. Selenium IDE accepts xpath values for locating elements but I'm having trouble with identifying an appropriate combination. –  Jay J 13 hours ago
    
In this example the XPath could look like: "//td[@value_'99999']" –  Pascal 13 hours ago
    
maybe this helps you: w3schools.com/XPath/xpath_syntax.asp –  Pascal 13 hours ago

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.