selenium.click("gwt-uid-204"); // this is recorded from Selenium IDE
I am clicking the check box in my (gwt) java application. The gwt-uid is changing ever time, so if the id changed then my element is not found in my apps. The regular expression is not working for me and I am not sure what I am doing wrong. Thanks for your help
selenium.click("gwt-uid-[0-9]);
I am using selenium 1.0.3, Java
Many GWT elements comes with ensureDebugId (method on UIObject) to allow you to explicitly set Ids to elements for testing and debugging purpose. You also need to inherit the module
<inherits name="com.google.gwt.user.Debug"/>
to make it work. The advantage of this is, you can remove the trace from the production deployment by removing the inherited module in during prod mode compile. Hence there wont be code changes to remove unnecessary Ids.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With