validate.Atribute returned failure

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

validate.Atribute returned failure

Post by omayer » Wed Jan 09, 2013 6:00 am

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
Tipu

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: validate.Atribute returned failure

Post by Support Team » Wed Jan 09, 2013 4:21 pm

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

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: validate.Atribute returned failure

Post by omayer » Mon Jan 14, 2013 10:09 pm

same error - Module execution was aborted because a validation step has failed
Tipu

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: validate.Atribute returned failure

Post by omayer » Mon Jan 14, 2013 10:24 pm

Thank you Bernhard, it worked
Tipu