Setting focus to the correct Browser tab

Ask general questions here.
User avatar
Aracknid
Posts: 388
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Setting focus to the correct Browser tab

Post by Aracknid » Fri Jul 22, 2011 9:36 pm

I've got a browser window stored as a Form object. It has multiple tabs with different web pages, each stored as a Web Document object (DOM).

I want to click something on one of the tabs, but another tab has focus and is the one being displayed on top.

How do I make the Web Document I want to work with the active one? I've tried EnsureVisible, Focus, etc... and it never comes to the front. Is there something like an Activate command for a DOM object to automatically bring it to the front? Do I need to write code to walk through the Form object and click the tab that I want?

Thanks,

Aracknid

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

Re: Setting focus to the correct Browser tab

Post by Support Team » Mon Jul 25, 2011 12:27 pm

Aracknid wrote:I've got a browser window stored as a Form object. It has multiple tabs with different web pages, each stored as a Web Document object (DOM).
Please could you post us a Ranorex Snapshot of the entire form to check if it is possible to bring the tab to foreground?
How to create a Ranorex Snapshot
Thanks in advance.

Regards,
Peter
Ranorex Team

User avatar
Aracknid
Posts: 388
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: Setting focus to the correct Browser tab

Post by Aracknid » Thu Jul 28, 2011 2:46 pm

Sorry, I ended up changing the way my framework works and changed our browser default to not use tabs, so while this may still be an issue, it is not one for me anymore.

Aracknid