how to use function keys and keywords at the same time in c#

48 Views Asked by At

Have to press f7Q to quit from an windows application for that my below code is not working.

element.SendKeys(Keys.F7 + "Q");
1

There are 1 best solutions below

0
Agent Shoulder On

If I undestand you correctly, you want to send a key combination to the browser/driver. If that is the case, you can use Actions. Example code below:

Actions action = new Actions(driver);
action.SendKeys(Keys.F7 + "Q");