• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in selenium.windowMaximize

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have created a selenium testcase which will open up the site and execute the testcase but in case of failure i have to captured the screen shot .The problem in selenium executes the testcase in minimized state so it captures the blank screen .





Please suggest me how to maximize the window.

Thanks in advance

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
public class WindowMax{

public static void main(String args[])throws Exception{
WebDriver driver=new InternetExplorerDriver();

WebDriverBackedSelenium selenium=new WebDriverBackedSelenium(driver,"http://www.google.com");
selenium.open("http://www.google.com");
selenium.windowMaximize();
Thread.sleep(100);
}
}

Use this code this will help you out
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic