Validate Exist

Class library usage, coding and language questions.
omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Validate Exist

Post by omayer » Tue Feb 14, 2012 8:30 pm

how to hide the entire xpath to display on report when using validate.exist function, like to display only the text like "page loaded successfully"..here is the code i am currently using ..thank you in advance

Code: Select all

public void ClickOnGoBttn()
        {
     	
     	InputTag goBttn = "/dom[@caption='xxx']/frameset/frameset[@id~'mainfr*']/frame[@name~'main*']/body/table/tbody/tr/td/table[6]/tbody/tr[2]/td[2]/table/form/tbody/tr[2]/td/input[@id='MmCommandButton']";
     	goBttn.PerformClick();      	
     	Validate.Exists("/dom[@caption='xxxxtestpage']/frameset/frameset[@id~'mainfr*']/frame[@name~'mainrm*']/body/table[1]/tbody/tr[1]/td[@id='Pagetitle' and @innertext=' yyy ']",10000);
				
     	}





validateExist.jpg
validateExist.jpg (20.15 KiB) Viewed 1896 times
Thanks,
Beginner
Tipu

User avatar
sdaly
Posts: 238
Joined: Mon May 10, 2010 11:04 am
Location: Dundee, Scotland

Re: Validate Exist

Post by sdaly » Wed Feb 15, 2012 11:12 am

Validate.Exists("rxpath", "Validating page loaded");

or

Validate.Exists("rxpath", 10000, "Validating page loaded");



Check out http://www.ranorex.com/Documentation/Ranorex/ :)

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

Re: Validate Exist

Post by omayer » Wed Feb 15, 2012 9:54 pm

Thank you sdaly , it works, can't follow the document since there are no example of code http://www.ranorex.com/Documentation/Ranorex/ , Support team really needs to work on API doc to add code example.
Thanks,
Beginner
Tipu

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Validate Exist

Post by Support Team » Thu Feb 16, 2012 10:32 am

Hi,

we think that simply having a look at the method overloads in API doc or code completion should provide you a good overview on how and when using which overload.

We will discuss the possibility of adding code examples to our API doc.


Regards,
Tobias
Ranorex Support Team
.
Image