Jump to content

How to click tab in browser


Recommended Posts

Using "Developer Tools" I've found this information on a tab control being used on our website. How can I send a click command to the "Products" tab?

<A id=linkProducts class=tabControlDefaultNavigatorItem onclick="return expandContent(this)" href="#" ifeid="200" ifetype="container" disabledNavigatorItemClass="tabControlDefaultDisabledNavigatorItem" defaultDisabledNavigatorItemClass="tabControlDefaultDisabledNavigatorItem" defaultTab="false" disableonload="" tabNavigator_SelectedNavigatorItemClass="tabControlDefaultSelectedNavigatorItem" tabNavigator_DefaultSelectedNavigatorItemClass="tabControlDefaultSelectedNavigatorItem" tabNavigator_NavigatorItemClass="tabControlDefaultNavigatorItem" tabNavigator_DefaultNavigatorItemClass="tabControlDefaultNavigatorItem" tabNavigator_TabContentClass="" tabNavigator_DefaultContentClass="tabControlDefaultContent" tabGroupID="38" tabID="200" isTabHeading="true">

<DIV>Products </DIV></A>

Link to comment
Share on other sites

You don't need to have a tab "active" to be able to interact with it, AFAIK.

I've got two tabs open www.google.com and www.bing.com i've selected Bing and ran this code.

#include <ie.au3>

$oIE = _IEAttach("Google")
$oForm = _IEFormGetObjByName($oIE, "f")
$oQuery = _IEFormElementGetObjByName($oForm, "q")
_IEFormElementSetValue($oQuery, "AutoIt IE.au3")
_IEFormSubmit($oForm)

Not sure if this is what your looking for?

Edited by Steveiwonder

They call me MrRegExpMan

Link to comment
Share on other sites

You don't need to have a tab "active" to be able to interact with it, AFAIK.

I've got two tabs open www.google.com and www.bing.com i've selected Bing and ran this code.

#include <ie.au3>

$oIE = _IEAttach("Google")
$oForm = _IEFormGetObjByName($oIE, "f")
$oQuery = _IEFormElementGetObjByName($oForm, "q")
_IEFormElementSetValue($oQuery, "AutoIt IE.au3")
_IEFormSubmit($oForm)

Not sure if this is what your looking for?

No, this is no good I'm afraid. You have the name of the tab and I don't ... well not from the information I posted in my first post.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...