Can someone explaing to me how to use tabs in code? Here's an example of what I'd like to do:
1. Open a new browser tab (in a opened browser)
2. Navigate to a specific page in the new tab
3. Return to the first tab (without closing the second one)
4. Return to the second tab and closing the first one
Also, using browser windows, how do I jump between open browser. If I have two IE8 browsers runnnig, how do I toggle between them? I'm looking for something like Browser2.Focus();
/Nicklas
Working with (browser) tabs
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Working with (browser) tabs
Hi,
Please take a look at the following post, maybe it answered your questions:
http://www.ranorex.com/forum/dom-ensure ... t2690.html
You can close a tab by calling the Close() method of the WebDocument and open it with Host.Local.OpenBrowser("YourSite");.
Regards,
Markus
Ranorex Support Team
Please take a look at the following post, maybe it answered your questions:
http://www.ranorex.com/forum/dom-ensure ... t2690.html
You can close a tab by calling the Close() method of the WebDocument and open it with Host.Local.OpenBrowser("YourSite");.
Regards,
Markus
Ranorex Support Team
Re: Working with (browser) tabs
Okej, thanks. I understand how to open and close tabs now. But I still don't have a clue how to switch between them. I've read the post you linked to but I'm still confused.
In FF I can use EnsureVisible on an element and the correct tab will show, correct?
But how do I do it in IE? "...For IE you have to search the MSAA Element, because this Browser doesn't support tab switching with Ensure Visible.", what does that mean?
/Nicklas
In FF I can use EnsureVisible on an element and the correct tab will show, correct?
But how do I do it in IE? "...For IE you have to search the MSAA Element, because this Browser doesn't support tab switching with Ensure Visible.", what does that mean?
/Nicklas
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Working with (browser) tabs
If you use IE9 then you can use following RxPath for the tabpagelistNicklas wrote:But how do I do it in IE? "...For IE you have to search the MSAA Element, because this Browser doesn't support tab switching with Ensure Visible.", what does that mean?
/form[@processname='iexplore' and @class='IEFrame']//tabpagelistBut this could take a while to find this element. If you've found this element you can switch between the tabs by using the select action as you know it for MSAA elements.
Regards,
Peter
Ranorex Team
Re: Working with (browser) tabs
Great! Still think it's a very strang and cumbersome way. Many other tools have a much simpler and easier way on working with browser tabs. However Ranorex still rocks 

- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Working with (browser) tabs
Hi,
Regards,
Peter
Ranorex Team
In Firefox, Chrome and Safari it is easier, because the Ensure Visible works. It is only the IE which doesn't support this feature. But I've added a feature request to our internal bug tracking list to create a way to make it easier for our users to switch between the IE tabs.Nicklas wrote:Great! Still think it's a very strang and cumbersome way. Many other tools have a much simpler and easier way on working with browser tabs.
It is good to hear that our customers are that pleased with Ranorex. Thank you for the feedback. You are welcome.Nicklas wrote:However Ranorex still rocks
Regards,
Peter
Ranorex Team