Testing links
-
- Posts: 31
- Joined: Mon Jan 10, 2011 1:05 pm
Testing links
I have a webpage which contains a number of links.For each one, I want to click on the link which opens a new window. I then want to check that an appropriate page shows (report screenshot) and close the window before clicking on the next link on the original page. The question is, how do I identify the new window that opens so that I can screenshot it and close it?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Testing links
Hi,
you can iterate thru your tabPages via a foreach statement.
In this statement you can click on the tab, make a screenshot and close the specified tab.
The code should look something like this:
Tobias
Support Team
you can iterate thru your tabPages via a foreach statement.
In this statement you can click on the tab, make a screenshot and close the specified tab.
The code should look something like this:
IList<Ranorex.TabPage> tabPageList = repo.IE.Self.Find<Ranorex.TabPage>("./Path/to/your/tabpage"); foreach (Ranorex.TabPage tab in tabPageList) { tab.Click(); Report.Screenshot(); Keyboard.Press("{LControlKey down}{Wkey}{LControlKey up}"); }Regards,
Tobias
Support Team