Forum Discussion

tobello's avatar
tobello
Contributor
11 years ago

Unable to click MSAA splitButton object

Hi,



I need a help on this issue; I search the forum but therei's no post helped out.

I automatically generate an SSRS report through Sharepoint UI.

I'm looking to export it for test validation vs expected. But when I request to save the file to export from a MSAA toolbar, I'm alway geting a window overlapping message and the click action cannot be performed.

Even still the MSAA Toolbar is visible on the screen, and I can click it no problem...

I have tried the whole day to get a fix and but I run out of ideas...  Issue still there.

Could someone, PLZ, tell what could be the reason??



Here's the last version of my function:




function ExportReport()


{


 


  [... ] //Section to lauch the export... 


 


  browserWindow = Aliases.browser.BrowserWindow;


  toolBar = browserWindow.FrameNotificationBar.DirectUIHWND;


  toolBar.Refresh(); // <=== Tentative


  toolBar.SetFocus(); // <=== Tentative


  aqUtils.Delay(3000);  // <=== Tentative


  toolBar.Click();


  


  btnSave = toolBar.splitbuttonSave;  


  btnSaveVOS = btnSave.VisibleOnScreen; // <==== Alway EQUALS FASLE [ WHY???? ]


 


  if(!btnSaveVOS)


  {


    btnSave.Refresh();


    btnSave.RefreshMappingInfo();  //  <==== This does not work


    btnSave.WaitProperty("VisibleOnScreen", true, 15000); //  either this too


    


    var MSAAObj = btnSave.GetUnderlyingObject();  // either this too


    MSAAObj.Click();  // <=== a overlap window still given...


  }


  


 


  //toolBar.SplitButton("Save").Keys("[Enter]");   //  <==== This does not work


  //btnSave.Keys("[Enter]");   //  <==== This does not work EITHER


 


  btnSave.Click(); // <==== This does not work EITHER


 


 


  /*


  Close after export is completed


  toolBar.Click();


  toolBar.Button("Close").ClickButton();


  */


 


}


 

And by the way I got this message... in the log

There was an attempt to perform an action at point (42, 11) which is invisible or out of the window bounds. ....



plus the additionnal log info




Tested object:


Sys.Browser("iexplore").BrowserWindow(0).Window("Frame Notification Bar", "", 1).ToolBar("Notification bar").SplitButton("Save")



Regards,

 



















  • Hi all there,

    As one said a while ago: "We are more than well self served..".



    I found the solution for the issue i was facing.

    even if the code lines are explicite, if any one needs more details, do not hesitate...  






    function ExportReport()


    {


     


      [... ] //Section to lauch the export... 

     


        //Perform Save (Export) on generated report


        browsWind = Aliases.browser.BrowserWindow;


        browsWind.FrameNotificationBar.SetFocus();


        toolBar = browsWind.FrameNotificationBar.DirectUIHWND;


        toolBar.SetFocus();


        toolBar.Click();


      


        var btnSave = browsWind.FrameNotificationBar.DirectUIHWND.splitbuttonSave;


        var btnSaveVOS = btnSave.VisibleOnScreen;


        while(!btnSaveVOS)


        {


          Sys.Refresh();


          aqUtils.Delay(1500);


          btnSave.RefreshMappingInfo();


          btnSaveVOS = btnSave.VisibleOnScreen;


          toolBar.SetFocus();


          toolBar.Click();


        }


      


        if(btnSave.WaitProperty("VisibleOnScreen", true, 1500))


        {


          btnSave.Click();


          aqUtils.Delay(1500);


          browsWind.FrameNotificationBar.DirectUIHWND.buttonClose.Click();


        }


        


      }


      catch(e)


      {


        Log.Error("Exception/Error in function ExportAReport...");


      }



    Ciao,