Example: Rewriting the HTML of a web control
This article provides an example of how to rewrite the HTML of a web control using Pega® Robotic Automation Studio to change the behavior of the web control. You typically rewrite the HTML of a web control to redirect hyperlinks to other destinations. You can also use this capability to highlight specific controls or make visible controls that have been hidden by the page.
Follow these steps:
- Create a new solution and add a web application.
- Set the StartPage to: http://training.openspan.com/login
- Start interrogation and interrogate the user name text box, the password text box, the Login button, and the information label found at the bottom of the sign in page.
- Add an Element Index match rule to the information label to make sure it matches uniquely.
- Create a new automation.
- Add the Created event for the information label.
- Add the OuterHtml property for the label.
- Connect the Created event to the OuterHtml property.
- Set the OuterHtml property to: Web Adapter Certification Course.
- Run the solution.
When the system creates the control, its OuterHtml is rewritten. This causes a message box to display when clicked.
Published November 15, 2016 — Updated July 24, 2018