How to select Browser Tab with LeanFT
Question ID: 107642
1
0

I need to select specific tabs on IE using LeanFT but I can’t seem to figure out how to do it.

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on May 1, 2017 6:38 pm
334 views
Answers (1)
1
Private answer

To do this you have to add:

using HP.LFT.SDK.StdWin;

and then in your code, put:

var TabRow = browser.Describe(new UiObjectDescription
{
AccessibleName = string.Empty,
WindowClassRegExp = @''DirectUIHWND''
}).Describe(new TabControlDescription
{
AccessibleName = @''Tab Row'',
AttachedText = string.Empty,
NativeClass = @''page tab list''
});

You can then use the index of the tab you want to select, starting with tab 0 like this:

TabRow.Select(0); //selects the first tab
TabRow.Select(1); //selects the second tab

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on May 1, 2017 6:38 pm
0
That worked great for us. Thanks!
( at May 1, 2017 6:39 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top