Selenium: setting an ID on GWT widgets

Selenium is an automated testing tool for web applications. If you are using Selenium test cases for GWT (Google web Toolkit), you need to set the ID's on UI widgets. Each clickable HTML element should have an ID set using the ensureDebugId("my_id"); method. Make sure to use this ID once ONLY:
Label userName = new Label("User Name:"); userNameInput = new TextBox(); userNameInput.setStyleName("textbox"); userNameInput.ensureDebugId("userNameID");
In your gwt.xml file, include:
com.google.gwt.user.Debug


As an Amazon Associate I earn from qualifying purchases.

No comments:

Post a Comment

Post Scriptum

The views in this article are mine and do not reflect those of my employer.
I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
Follow me on:
X.com (Twitter)
LinkedIn
Google Scholar

Popular Recent Posts

Most Popular Articles

apt quotation..