Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..
1158 views

TruClient: control if a button is enable

Hello to all, 

I've a script registered with TruClient protocol (Firefox browser) and I need to test if a button is enable, digitizable, so to continue the web browsing. I've used the Wait For Object function, but that tests if a certain object exists, not if its enable to be pressed. 

Thanks for the collaboration, 

Lorenzo

0 Likes
2 Replies
Highlighted
Respected Contributor.
Respected Contributor.

Re: TruClient: control if a button is enable

Hi lbl,

Couple of options you can try:

Option 1:

Record both the versions : 1. with button enable and 2. with button disable and Find out the difference between those 2 recordings and you can implement the logic if true -> continue to the flow else -> exit.

Option 2:

When the button is enabled you get some response right, Check whether that response is coming or not using Wait for object or Verify. If that step is success then button is enabled else its disabled.

Try those and hopefully it will resolve this issue.

Thanks!

 

Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: TruClient: control if a button is enable

Change the object identification to xpath and implement the below logic.

If Enabled:

Inspect the element, it should have like this <button type="button" enabled="true" id="btnSearch">Click Me!</button>

Use xpath expression to identify the object e.g. //*[@id="btnSearch" and enabled()="true"]

If Disabled:

Inspect the element, it should have like this <button type="button" enabled="false" id="btnSearch">Click Me!</button>

Use xpath expression to identify the object e.g. //*[@id="btnSearch" and enabled()="false"]


Thank you,
NaveenKumar Namachivayam | www.QAInsights.com
Learn TruWeb - my Udemy Course "Performance Testing using TruWeb" | https://www.udemy.com/performance-testing-using-truweb/?couponCode=YOUTUBE
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.