Forum Discussion

nbenitus's avatar
nbenitus
Contributor
14 years ago

Internet explorer crashes when trying to maximize a maximized IE window

Hi,



I am doing distributed testing using VMware images.



One of my test requires an internet explorer window to be maximized.



However, sometimes, the IE window is not maximized (don't know why, it seems random), so I have written this line after starting the IE window:

 

Aliases.iexplore.page.Keys("~ x") (Alt + Space to show the popup, then X for Maximize)



The problem is, when the IE window is already maximized, this command will crash the IE window.



The same attempt on a real machine (and not a VM), works fine, without crash.



Any ideas?



Thanks in advance.



Benoit

4 Replies

  • jose_pita's avatar
    jose_pita
    Super Contributor
    I didn't have that IEFrame thing so I used :



    Sys.Browser("iexplore").BrowserWindow(0).Maximize(); 



    You just have to adapt it to your browser, FF, chrome or whatever, check the object browser for the accepted methods
  • Hi Benoit,

    The reason of the issue could be that the VMware workstation has its own command assigned to the Alt+Space+X keystroke.

    Try calling a special Maximize action instead:  

    Aliases.iexplore.IEFrame(0).Maximize()
  • Does this method apply for other browsers as well?