Ask a Question

SelectedTab [set] not working

Occasional Contributor

SelectedTab [set] not working



For a Keywordtest TC must open all Tabs and subTabs one by one. I do this by using "SelectedTab [set]" which works great except when it doesn't.

Most of the time it works great, however for some Tabs it can't find the tab and I get an error.

When manually clicking the Tab then going back to another one and running the selected operation suddenly it can find the tab it could not find before.


Some Tabs can be found some only after openning once before.

"SelectedIndex [set]" Does work, But if the Tabs were to change order then I would not get the right Tab.





I don't understand why it can't find the Tab but when the Tab has been opened once it can suddenly find it.



Super Contributor

You need to study the UI control and figure out the behaviour using the Object Spy tool.


See the requirements of Testing .NET Applications

Occasional Contributor

I could not find the solution to this problem,

I did however sort of find out why this is a problem, the Tabs that don't work are not namemapped untill they have been 'Woken up'.

My dirty fix was just to use the keys action:

Aliases.etc.etc.tpAlgemeen.pnlKlantInfo.tabKlantInfo.tabContactpersonen > Keys > [Right]

this way it can go to every SubTab without using "SelectedTab [set]".


For main Tabs I used:

Aliases.etc.etc.tpAlgemeen > Keys > [Down]


It's a bad fix but for now it's all I have


Thank you rraghvani  for the help.

Showing results for 
Search instead for 
Did you mean: