Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
476 views
by Contributing Tester (92 points)
_driver.get( url );
By by = get_element( "nav" );
_driver.manage().window().maximize();
_driver.findElement( by ).sendKeys( Keys.F11 );
sleep( 2000 );

Unable to send F5& F11 keys post maximizing the window. Please help if someone is aware of the solution.

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
selected by
 
Best answer

You have three questions here:

q: SendKeys is not working.

a: You need to check your gekodriver. Make sure its updated to have sendKeys work fine.

q: Key F11 is not working

a: Selenium is built using JavaScript as its core. When you press key F11, its not executed by JavaScript. Its executed by the browser. So, selenium may not support use of F11 and F5 keys.

q: F5 Key is not working

a: Instead of F5 I would recommand you to use refresh()

If you are ought to use F11 and F5 keys, I would suggest you to use thrid party tools like AutoIT.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...