Hi all,

in our system to test, buttons on the pages are disabled until everything is 
ready on the page. After that they are enabled.
Apparently webtest just clicks those buttons anyway, without waiting for them 
to be enabled. Therefore I decided to wait for them to be enable before 
clicking them.

A button on a page looks for example like this:
<INPUT class="button2" type="reset" name="Cancel"  disabled  enable 
value="Cancel" 
onclick="document.Detail.target='_self';setBack('UC117_listVariousInvoice')">

Now I know it says 'disabled enable', but that's the way the framework is 
implemented. Anyway, when I use the webtest recorder bar and check the 
following xpath:

count(//input[@name='Cancel']/@disabled)=0

it results to 'false', as expected, because the cancel button contains the 
disabled property.

Now, I have the following statement in my test immediately after switching to 
the page:

<storeXPath
                description="TESTTESTTEST"
                xpath="count(//input[@name='Cancel']/@disabled)=0"
                property="testProp"
/>

The result of this statement is that testProp is set to true! Which is not 
correct of course!
So that means that I cannot use this test to check for the status of the 
button...

Does anybody else has experience with this kind of problem?

Thanks!

David

Reply via email to