Forum Discussion

David91's avatar
David91
Frequent Contributor
5 years ago

Ultragrid object invisible error

Hi, I have problems with an object ultragrid Seky_tabulka that is visible but when performing the test the face is invisible and test script doesnt see it.. Object sppy detect visible is true..   v...
  • tristaanogre's avatar
    tristaanogre
    5 years ago

    HRm...  is the error you're getting that the object is not visible?  Or is it the error you're getting that he object does not exist?

     

    If it's an existence problem and not a visible problem, try the following change to your code.

    var table = Aliases.ShellForm.MainWorkspace.WorkingMainView.m_tableLayoutPanelMain.m_panelLeft.LeftWorkspace.TableLayoutDynamicView.m_tableLayoutPanel.BoundedDynamicViewPanel.UltraGridViewControl.WaitAliasChild("m_ultraGrid", 20000);
    
    if !table.Exists {
        Log.Message("Unable to find ultraGrid table")
    }
    else {
        var r_Mena = table.FindRow(0, KOD_SEK);
    }

     

    The problem very well might be in FINDING the object, not in it's visibility.  The "WaitAliasChild" does an active search and wait up to the timeout to determine if the object is even present in memory.  If the object returns within the timeout, then the result of WaitAliasChild is the object itself.  If the object does NOT return, then the result of WaitAliasChild is a "stub" object with only the "Exists" property and that property set to false.

     

    Give this a try and report the results.