Ask a Question

SelectedTab [set] not working

SOLVED
MW_Didata
Occasional Contributor

SelectedTab [set] not working

Hello,

 

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.

 

MW_Didata_0-1669040706137.png

MW_Didata_3-1669041081922.png

 

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

 

 

11 REPLIES 11
rraghvani
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

MW_Didata
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.

cancel
Showing results for 
Search instead for 
Did you mean: