Forum Discussion

narender_1's avatar
narender_1
Contributor
14 years ago

How to handle mouse leave event

Hi,

 In Manual testing after checking a check box the below six fields are changing to disable mode, But in Automation after checking the checkbox the fields are not changing to disable mode. Please find the Automation and Manual testing screenshots for clear understanding.

  Regarding this I communicate with developer team they said  that this is  effecting due to  mouse click event (In manual testing after click and leaveing the left mouse button it is effecting).  Please suggest me how to over come from this problem.



Thanks,

Narender 

 













 

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    What is your actual script code or keyword test doing to check the box?  If you're calling a "SetChecked" method, that's not actually going through a mouse event.  If you're calling a "Click" method, that should be simulating a mouse event.  
  • Hello,

         This is my code :-



    Aliases.EliteMCP.MainForm.splitContainer1.SplitterPanel1.operatorManagement1.operatorDetailsGroupBox.m_chkUseAddress.wState = cbUnChecked  

      Can u please suggest me how to over come from  this problem.



    Thanks,

    Narender










  • Hi Narender,



    When changing the check box state by directly setting the wState property value, mouse events are not actually raised. To simulate the actual mouse click on the check box and have the corresponding events raised, use the ClickButton method instead:

    Aliases.EliteMCP.MainForm.splitContainer1.SplitterPanel1.operatorManagement1.operatorDetailsGroupBox.m_chkUseAddress.ClickButton(cbUnchecked)