Subject7 Self-Healing

Subject7 provides self-healing to commands so that when certain errors occur, the user is not required to perform any maintenance to steps and therefore the test case will continue to execute the steps. Messages will be displayed where self-healing is triggered. Here is an example scenario:

Intercepted Elements: If your test case has steps that will click on an element which is concealed by another element or another window is in front, the test case will run the step and no error will be thrown.

For example, if we log into Reference App, go to Profile and click Edit Profile, any of the surrounding elements are seen in the background while Edit Profile window is in front. We can still interact with the elements in the back by clicking on them, such as Friends link highlighted below:

mceclip0.png

The following message shows that self-healing procedure was triggered:

mceclip1.png

 

You can copy and paste this test case snippet in Advanced View and run it to see the message in the execution of the last step:

WEB GOTO_URL "https://reference.subject-7.com" HALT ON ERROR 
WEB CLICK TARGET ELEMENT XPATH "//a[contains(text(),'LOGIN')]" HALT ON ERROR
WEB FILL TARGET ELEMENT XPATH "//input[contains(@placeholder, 'Email')]" VALUE "ballan@subject-7.com" HALT ON ERROR
WEB FILL TARGET ELEMENT XPATH "//input[contains(@placeholder, 'Password')]" VALUE "test123" HALT ON ERROR
WEB CLICK TARGET ELEMENT XPATH "//text()[contains(.,'Login')]/ancestor::button" HALT ON ERROR
WAIT 5 HALT ON ERROR
WEB CLICK TARGET ELEMENT XPATH "(//a[contains(text(),'Profile')]/ancestor::li/descendant::a)[1]" HALT ON ERROR
WEB CLICK TARGET ELEMENT XPATH "//a[contains(text(),'Profile')]" HALT ON ERROR
WEB CLICK TARGET ELEMENT XPATH "//text()[contains(.,'Edit profile')]/ancestor::a" HALT ON ERROR
WEB CLICK TARGET ELEMENT XPATH "(//a[contains(text(),'Friends')])[2]" HALT ON ERROR
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.