Forum Discussion

stega's avatar
stega
Contributor
12 years ago

JTabbedPane problem

Hi All,

I have a problem with the JTabbedPane object. When i want to call the ClickTab method i get the following erroe message:

"The 'Back Office Window for Trade 32483 (User: calypso_user)' window is invisible and thus cannot be activated."



This is the part, where i want to use the ClickTab method:

var tabbed = javaw.Find("Name", "SwingObject(\"JTabbedPane\", \"SDI\", 0)", 1000);

tabbed.ClickTab("Tasks");

  • Hi Gabor,


     


    I suggest that you add an additional search parameter to the Find method - the search by the Visible property whose value should be True.


     

  • When i run the script first, the script clicks on the tab, but when i run it again, it logs, the Tab pane already been selected. But on the window, the SDI tab is selected. I think the app caches somehow the last run. How can i force clicking the tab, even if it is selected?