Page 1 of 1

Automation Help with Control

Posted: Wed Aug 10, 2016 7:39 am
by subodh4u7
Hello Experts,

I have below scenario:
1. Initially Button Ok is disabled, so want to verify button is disabled.
2. Once i select other item, then Button is Enabled and then want to click on that, so before clicking want to verify whether button is enabled or not.

How can i get such things to be done. I searched there is no method called WaitForEnabled or VerifyEnabled.

Can anyone please suggest someone how can i extend the ranorex method to create such method.
e.g. 1. WaitForEnabled(True/False, timeout,throwExceptionIfConditionNotMet) --> True or false decides where button is enabled or disbale

2. VerifyEnabled(True/False, String buttonInfo, timeout, throwExceptionIfConditionNotMet)

It will be great if we can develop some method for such usage which could help in automation
e.g VerifyText(String value, timeout, throwException), VerifyTextContains(String value, timeout, throwException)

Re: Automation Help with Control

Posted: Wed Aug 10, 2016 8:08 am
by odklizec
Hi,

In my opinion, the easiest way to achieve what you want is to add @enabled='true' to the repo element xpath. So the xpath should look something like this:
tbody//input[@type='submit' and @enabled='true']
Then you can use Validate NotExists, to validate the not existence of repo element, which meets the @enabled='true' condition. After that, you can use WaitFor Exists method, which will pause the test until the condition @enabled='true' is met. Once the button is enabled, the test should continue and in the next step you can press the button. Hope this helps?