Page 1 of 1

validate.Atribute returned failure

Posted: Wed Jan 09, 2013 6:00 am
by omayer
Ranorex 4.0-
validate.Attribute returned failure message on log using following code, trying to validate list item selected from the dropdownlist


Code: Select all

   	WebDocument webDocument = "/dom[@page='xxx and @caption='yy']";
         	///select status
            SelectTag findStatus = webDocument.FindSingle(".//select[@id='v_STATUS']",20000);
            findStatus.Click(Location.CenterRight);
            ListItem item = "/container[@caption='selectbox']/listitem[@text='"+_status+"']";
			item.Click();
			Validate.Attribute(item, "text", _status,"Select Status: " +_status);
thank you

Re: validate.Atribute returned failure

Posted: Wed Jan 09, 2013 4:21 pm
by Support Team
Hello,

Please try to place the following code snippet
item.Click();
behind the Validate.Attribute() method.
Validate.Attribute(item, "text", _status,"Select Status: " +_status);
item.Click();
Regards,
Bernhard

Re: validate.Atribute returned failure

Posted: Mon Jan 14, 2013 10:09 pm
by omayer
same error - Module execution was aborted because a validation step has failed

Re: validate.Atribute returned failure

Posted: Mon Jan 14, 2013 10:24 pm
by omayer
Thank you Bernhard, it worked