Ask a Question

SelectedTab [set] not working

SOLVED
MW_Didata
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
MW_Didata
Contributor

I have also tried using "set_selectedTab" This gave the same issues

rraghvani
Valued Contributor

What are the properties of tabLlantinfo object?

This is what the application looks like, on the left arre main tabs, on the top are subTabs

MW_Didata_0-1669103557672.png

as for the properties, I dont know what properties you want to know.

TabklantInfo is just part of tpAlgemeen (tpAlgemeen is in the left list of Tabs) i need TC to go to tabFinancieel (in the top list of subTabs)

 

EDIT: For extra information, subTab 'Klantmedewerkers' can be opened by using SelectedTab, Financieel, Prijzen, Verkoop, etc....  Can't be found using this action

rraghvani
Valued Contributor

I wanted to see if there's anything that uniquely identifies the tabs, for example.

rraghvani_0-1669119722177.png

And when switching between tabs, do the properties change

Things like Name, WndCaption, WinformsControlName.

There is a Controlid, however i dont know if that stays consistent everytime you open it.

Once i open the tabFinancieel and then open another one suddenly TC can switch back to tabFinancieel.

(it will not remember if you then close the whole app)

TC just says it does not exist if not opened before. while other tabs will open first try

MW_Didata_0-1669120303511.png

 

rraghvani
Valued Contributor

You click on Omzetten and then click on Financieel? I guess the object is not shown straight away, and hence WinFormObject("tabFinancieel") fails. Try and add a delay.

I Have tried with delays, using Rclick on SelectedTab_[set] 'Run selected operation' it can't find the tab, I think the object just doesn't exist untill it has been opened once.

 

TC just posts the same error as 1st pic stated above

rraghvani
Valued Contributor

Insert delay after the "left mouse button" ?

 

rraghvani_0-1669130644507.png

 

I tried but that does not work.

cancel
Showing results for 
Search instead for 
Did you mean: