Working with (browser) tabs : General Questions

Working with (browser) tabs

Ask general questions here.

Working with (browser) tabs

Postby Nicklas » Tue Oct 11, 2011 11:12 am

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
Nicklas
 
Posts: 15
Joined: Mon Sep 26, 2011 3:53 pm

Re: Working with (browser) tabs

Postby Support Team » Tue Oct 11, 2011 1:59 pm

Hi,

Please take a look at the following post, maybe it answered your questions:
http://www.ranorex.com/forum/dom-ensure-visible-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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Working with (browser) tabs

Postby Nicklas » Wed Oct 12, 2011 10:50 am

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
Nicklas
 
Posts: 15
Joined: Mon Sep 26, 2011 3:53 pm

Re: Working with (browser) tabs

Postby Support Team » Wed Oct 12, 2011 1:17 pm

Nicklas 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?

If you use IE9 then you can use following RxPath for the tabpagelist
/form[@processname='iexplore' and @class='IEFrame']//tabpagelist

But 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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Working with (browser) tabs

Postby Nicklas » Wed Oct 12, 2011 4:38 pm

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 :)
Nicklas
 
Posts: 15
Joined: Mon Sep 26, 2011 3:53 pm

Re: Working with (browser) tabs

Postby Support Team » Wed Oct 12, 2011 5:07 pm

Hi,
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.

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:However Ranorex still rocks :)

It is good to hear that our customers are that pleased with Ranorex. Thank you for the feedback. You are welcome.

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to General Questions

Who is online

Users browsing this forum: No registered users and 0 guests