locked
Cross browser testing: Mouse Middle click operation not working in chrome and firefox browsers RRS feed

  • Question

  • Hi,

    In my workflow I have to automate mouse middle click operation on the hyperlink so that form opens in new tab.But in Chrome and Firefox instead of middle click it is doing click action and form is opening in the same tab and rest of actions failing in my script.Let me know how to automate middle click action?

    Regards,

    Nagasree.


    • Edited by Nagasree Friday, January 2, 2015 7:53 AM
    Friday, January 2, 2015 6:38 AM

Answers

  • Hi Nagasree,

    If it worked well in IE, I'm afraid that it would be related to the cross-browser tests' extension tool, so start a discussion here would be better for this issue:

    https://visualstudiogallery.msdn.microsoft.com/11cfc881-f8c9-4f96-b303-a2780156628d

    I think you would get dedicated response from the extension tool experts.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 12, 2015 8:29 AM

All replies

  • Hi Nagasree,

    I think you could get one workaround with this thread posted by you here.

    https://social.msdn.microsoft.com/Forums/en-US/vstest/thread/0f50d578-0778-489e-b719-8f9f7ea4eb16/#17ad15db-3fa2-49e0-8ef4-d3eb6a5241d7

    We could get the Height, Width, Top and Left of a control, and then execute a middle click with custom code using the "Point" parameter.

    cellUITestControl.SetFocus();
    
    Rectangle r = cellUITestControl.BoundingRectangle;
    
    Mouse.Click(new Point(r.X + r.Width/2 + r.Y + r.Height/2)); 
    

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, January 5, 2015 7:00 AM
  • Hi,

    I want to do mouse middle click operation not clicking on the middle of the control.Could you please reconsider my question again and reply to the thread?

    Regards,

    Nagasree.

    Monday, January 5, 2015 10:35 AM
  • Hi Nagasree,

    Sorry for my misunderstanding about this issue.

    So the real issue is that you use the mouse middle click method in your coded UI test, but it doesn't work in your browsers, am I right? If so, does it work well in IE browser? In addition, you said that your browser opened in the same tab, is it the browser issue? I mean that whether it is related to the browser settings. For example, if we want to open a new page in a new tab, we could set it under Tools->Internet Options.

    So we would make sure that whether it is the test issue or the browser settings issue or the extension tool issue.

    If I misunderstood this issue, please feel free to let me know.

    Best Regards,

    Jack 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 6, 2015 7:04 AM
  • Hi,

    It is working in IE. Manually if I do Middle click it is opened in new tab so I think there is no problem with browser settings. It is not working in Chrome and Firefox browsers only.

    Regards,

    Nagasree.

    Monday, January 12, 2015 4:30 AM
  • Hi Nagasree,

    If it worked well in IE, I'm afraid that it would be related to the cross-browser tests' extension tool, so start a discussion here would be better for this issue:

    https://visualstudiogallery.msdn.microsoft.com/11cfc881-f8c9-4f96-b303-a2780156628d

    I think you would get dedicated response from the extension tool experts.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 12, 2015 8:29 AM