send F11 with selenium webdriver

2.924 görüntüleme
İlk okunmamış mesaja atla

ama...@bufetedemarketing.com

okunmadı,
7 Ağu 2017 07:42:437.08.2017
alıcı Selenium Users
Hi guys!

How could I maximize the window with Selenium Webdriver?? I want to simulate the "F11" action, but I'm not able to do it.

I've tried the following without luck:

          

1. driver.findElement(By.tagName("body")).sendKeys(Keys.F11);  
    Thread.sleep(5000);
    driver.findElement(By.tagName("body")).sendKeys(Keys.F5);    //this option doesn't work with Firefox and geckodriver Marionette.

 
2. driver.manage().window.setSize(1152,864);           //this doesn't compile
 
3. driver.findElement(driver.findElement(By.xpath("/html/body")).sendKeys(driver.Key.F11));    //this doesn't compile


Any ideas?

Thanks so much!! 

ama...@bufetedemarketing.com

okunmadı,
7 Ağu 2017 07:46:277.08.2017
alıcı Selenium Users
Hi guys!

How could I maximize the window with Selenium Webdriver?? I want to simulate the "F11" action, but I'm not able to do it.

I've tried the following without luck:

          

1. driver.findElement(By.tagName("body")).sendKeys(Keys.F11);  
    Thread.sleep(5000);
    driver.findElement(By.tagName("body")).sendKeys(Keys.F5);    //this option doesn't work with Firefox and geckodriver Marionette.

 
2. driver.manage().window.setSize(1152,864);           //this doesn't compile
 
3. driver.findElement(By.xpath("/html/body")).sendKeys(driver.Key.F11);    //this doesn't compile

   4. driver.manage().window().maximize();    //this option doesn't do anything

Andreas Tolfsen

okunmadı,
7 Ağu 2017 07:55:177.08.2017
alıcı seleniu...@googlegroups.com
Also sprach ama...@bufetedemarketing.com:

> How could I maximize the window with Selenium Webdriver?? I want
> to simulate the "F11" action, but I'm not able to do it.

WebDriver doesn’t let you interact with the surrounding
environment. It is limited to the web content.

To maximize the window, you can call the
driver.manage().window().maximize() method in the Java API, but
WebDriver conforming implementions also have a Fullscreen Window
command. Not sure if this is exposed in the Java API yet, but file
a bug if it isn’t. It should just work with geckodriver.

Bharadwaj Pendyala

okunmadı,
7 Ağu 2017 22:30:117.08.2017
alıcı Selenium Users
Could you share more details on why it isn't compiling? 

Alternate suggestion would be try using Robot class with Key press and key release events of F11. Please let us know in case if that works :) 

praveen kumar cherukuri

okunmadı,
8 Ağu 2017 09:16:478.08.2017
alıcı seleniu...@googlegroups.com
Hello All, 

Selenium library has a command to switch to "Full Screen" mode. 

try out this option at browser instance level. 


driver.manage().window().fullscreen();




photo 
Praveen Kumar Cherukuri
Test Automation ExpertQA-Masters 
pra...@qa-masters.com | Skype:  praveen_cherukuri |
 www.qa-masters.com | Trainers Outsourcing | Experts in QA Training | Technical Project Support


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/920ece11-eff5-430b-9a85-842a15419500%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

ama...@bufetedemarketing.com

okunmadı,
10 Ağu 2017 03:06:2310.08.2017
alıcı Selenium Users
Hi Praveen,

I've tried your option but it doesn't compile, it returns the following: org.openqa.selenium.WebDriverException: fullscreenWindow

What can be happening?

Thanks so much.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

ama...@bufetedemarketing.com

okunmadı,
10 Ağu 2017 03:08:3110.08.2017
alıcı Selenium Users, a...@sny.no
Hi Andreas,

I tried with that: driver.manage().window().maximize() 
But it doesn't make any change... I use geckodriver. Why doesn't it work?

Thanks so much.

Serguei Kouzmine

okunmadı,
11 Ağu 2017 22:00:0211.08.2017
alıcı Selenium Users
Please explore Robot

```
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;


try {
// press F11 key of keyboard to switch the browser to full screen
Robot robot = new Robot();
sleep(2000);
robot.keyPress(KeyEvent.VK_F11);
} catch (AWTException e) {
System.err.println("Exception (ignored) " + e.toString());
}

```

poobathy r

okunmadı,
11 Ağu 2017 22:11:2311.08.2017
alıcı seleniu...@googlegroups.com
Robot might work... But please do a keyrelease once you do a keypress

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1ac09f46-ed0b-4810-90d2-6be3a464f972%40googlegroups.com.

ama...@bufetedemarketing.com

okunmadı,
14 Ağu 2017 03:31:3214.08.2017
alıcı Selenium Users
Perfect Poobathy! It works correctly!! 

Thanks so much!!!!!
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

jos...@embluemail.com

okunmadı,
26 Eyl 2018 05:18:5026.09.2018
alıcı Selenium Users
Hello... I need the same things but in python.. Help Please
Tümünü yanıtla
Yazarı yanıtla
Yönlendir
0 yeni ileti