Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Issues with IE close browser, Firefox window focus. unable to get screenshots any browser

View previous topic View next topic Go down

Issues with IE close browser, Firefox window focus. unable to get screenshots any browser

Post by hresgil on Tue Dec 20, 2011 8:58 pm

Hi, my name is Hernan,

I'm trying to build a test suit and after investigating about the proper tool to use, I came across to selenium.

But I have found the following problems, that if not resolved then I may need to start all over again looking for a different automation tool.

1 Can't get screenshots with selenium 2.13 and 2.15 on any browser.

2. I have tried to maximize the Firefox browser in many ways, but I never succeed.

3. There is no way I can get focus on Firefox, so I can’t maximize it using JRobot.

4. Finally, on internet Explorer I always get error when closing selenium (selenium.close and selenium.stop commands) and the browser does not close. Then other tests that follow cannot be continued until closing the browser manually.

Could anyone help please?

Note I'm using IE8 and Firefox 8.0.1 (windows XP and Windows Vista)

hresgil

Posts : 5
Join date : 2011-12-20

Back to top Go down

Re: Issues with IE close browser, Firefox window focus. unable to get screenshots any browser

Post by faramka on Wed Dec 21, 2011 3:09 pm

There is a command in Selenium to maximize window:
Code:
selenium.windowMaximize();
If this will not work, try it using js:
Code:
selenium.getEval("window.resizeTo(X, Y); window.moveTo(0,0);");

If you want to close browser, try this:
Code:
selenium.getEval("window.close");

faramka
Professional
Professional

Posts : 143
Join date : 2011-09-15
Location : Poland

Back to top Go down

Re: Issues with IE close browser, Firefox window focus. unable to get screenshots any browser

Post by hresgil on Thu Dec 22, 2011 4:52 am

Thanks for your reply,

I have tried these suggestions, but neither one seem to work, could you please provide a working example?

hresgil

Posts : 5
Join date : 2011-12-20

Back to top Go down

Re: Issues with IE close browser, Firefox window focus. unable to get screenshots any browser

Post by hresgil on Mon Dec 26, 2011 9:05 pm

Hi,

I managed to maximize Firefox browser with the java script code as suggested by faramka.

Code:

selenium.getEval("window.resizeTo(screen.availWidth, screen.availHeight); window.moveTo(screen.availWidth, screen.availHeight);");


But unfortunately the program (eclipse) used to launch selenium RC, remains at the front and I have been unable to bring the main browser to the front of the screen.

I have tried 'selenium.windowFocus' and

selenium.getEval("wondow.focus"); but neither works.

I'm still trying to capture screenshots but no luck so far.

Any help would be very much appreciated thanks please?



hresgil

Posts : 5
Join date : 2011-12-20

Back to top Go down

Re: Issues with IE close browser, Firefox window focus. unable to get screenshots any browser

Post by faramka on Tue Dec 27, 2011 2:37 pm

Try use getAllWindowIds() or getAllWindowNames() and then selectWindow(). Read documentation for getting to know these commands.

faramka
Professional
Professional

Posts : 143
Join date : 2011-09-15
Location : Poland

Back to top Go down

Re: Issues with IE close browser, Firefox window focus. unable to get screenshots any browser

Post by jaffarlone on Tue Jan 24, 2012 3:15 pm

Hi, am facing similar problem, tried using getAllWindowIds(), it will print "id isundefined" on the console, my code is like this:

String getwindowid = "";
for(int i=0; i getwindowid = getwindowid + windowids[i];

}
System.out.println("id is" + getwindowid);

jaffarlone

Posts : 1
Join date : 2012-01-23

Back to top Go down

Re: Issues with IE close browser, Firefox window focus. unable to get screenshots any browser

Post by Sponsored content Today at 4:50 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum