host.local.find problem

Class library usage, coding and language questions.
meterrr
Posts: 2
Joined: Thu Jun 16, 2011 10:12 am

host.local.find problem

Post by meterrr » Thu Jun 16, 2011 10:17 am

i have got folowing code

Code: Select all

            Host.Local.OpenBrowser(url, "ie", true);
            var WebDoc = Host.Local.Find("/dom");
            foreach (WebDocument item in WebDoc)
            {
                Console.WriteLine(WebDoc.Count.ToString());
                Console.WriteLine(item.ToString());
            }
but id doesn't find anything
where is the problem ?

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

Re: host.local.find problem

Post by Support Team » Thu Jun 16, 2011 12:31 pm

Hi,

The code looks okay. Did you check with Spy if there is a DOM object available? I tried this code on my machine and it is working as expected.

Regards,
Peter
Ranorex Team