How to select Browser Tab with LeanFT

  • Questions
  • 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: 343, Answers: 24)
Asked on May 1, 2017 6:38 pm
48 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: 16, Answers: 753)
Answered on May 1, 2017 6:38 pm
That worked great for us. Thanks!
( at May 1, 2017 6:39 pm)