Window is invisible error
Hi,
I have problem with 'The window is invisible and thus cannot be activated.'.
Don't know why because it is visible. -> screen 01.png
This is short test recorded:
function Test2()
{
var NFZKom;
var NFZKomMainForm;
var navBarControl;
NFZKom = NameMapping.Sys.Process("NFZKom");
NFZKomMainForm = NFZKom.WinFormsObject("NFZKomMainForm");
NFZKomMainForm.WinFormsObject("BarDockControl", "", 5).WinFormsObject("DockedBarControl", "", 1).ClickItem("Polecenia|Rachunki");
navBarControl = NFZKomMainForm.WinFormsObject("MdiClient", "").WinFormsObject("RachunkiTab").WinFormsObject("dockPanel1").WinFormsObject("dockPanel1_Container").WinFormsObject("rachunkiBarControl");
navBarControl.ClickItem("Rachunek", "Nowy");
NFZKom.WinFormsObject("cmsPrint").Click(137, 10);
NFZKom.WinFormsObject("RachunekDoSzablonu").WinFormsObject("btnCancel").ClickButton();
navBarControl.ClickItem("Rachunek", "Nowy");
NFZKom.WinFormsObject("cmsPrint").Click(176, 77);
NFZKom.WinFormsObject("RachunekForm").WinFormsObject("btnCancel").ClickButton();
}
This works when I run test just after recording. When I restart TC or app this is not working.
I also attach objectspy ss 02.png
Tried to use: set_Visible(true) but then window blinks, TC cliscks but next window does not open and test stops. Looks like it was just empty click.
I also tryed to use ControlId (zero) and Id that is always different. No success.
I spoke about this with my dev team but maybe there is way to solve this.
Thank you, Damian.