Drag and Drop minimizes Firefox window

1 Answer 88 Views
Test Execution
Sven
Top achievements
Rank 1
Veteran
Sven asked on 03 Aug 2021, 12:32 PM

I have a very strange behaviour: A Drag & Drop Command was used and it works fine in Microsoft Edge. Testing the Test Case in Firefox shows a different behaviour. Prior to executing the actual Drag & Drop, the Firefox window is minimized, then the Drag & Drop Command is executed on whatever element is now on top of the desktop. To show the behaviour, I attached the comparison of the command in Edge and Firefox.

What can I do to make the Drag & Drop Command work in Firefox?

1 Answer, 1 is accepted

Sort by
0
Plamen Mitrev
Telerik team
answered on 05 Aug 2021, 01:01 PM

Hello Sven,

I analyzed the recorded videos and noticed that Firefox browser is not actually minimized, but its size is really changed. Based on what I see and the properties of the Drag & Drop step, it looks like Test Studio is trying to set the browser position at the 0,0 coordinates and the browser width and height to 0. Maybe the action was not recorded properly or something changed in the browser size or the monitors you used. I have two suggestions for you to try and resolve the issue and will list them below.

  1. Record the Drag & Drop step again, according to the instructions here
  2. Convert the Drag & Drop step into coded step, by right clicking on it and selecting Edit in Code. Then, open the coded step and delete or comment the ResizeContent() line, like this:
    //ActiveBrowser.ResizeContent(0, 0, 0, 0);

Please try the above suggestions and let me know if the issue persist. I will be happy to continue our discussion and advise you further.

Regards,
Plamen Mitrev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Sven
Top achievements
Rank 1
Veteran
commented on 06 Aug 2021, 05:48 AM

Thanks for the answer.

I replaced the ResizeContent in your suggestion with

ActiveBrowser.Window.Maximize();

Now it seems to work. I'm still puzzled why browser window resizing should be part of the drag and drop command but it works now.

Plamen Mitrev
Telerik team
commented on 06 Aug 2021, 08:40 AM

The solution you applied is also a good one. The issue is specific for Firefox and drag & drop step, which remembers the window size at the moment of recording and tries to set it back to the same value for the duration of the step. 

We are currently investigating this behavior further and will see if there is a solution that will work seamlessly, without breaking any existing steps. I am happy that you have a fix for your test.

Tags
Test Execution
Asked by
Sven
Top achievements
Rank 1
Veteran
Answers by
Plamen Mitrev
Telerik team
Share this question
or