Complete the code to press the SHIFT key down using Selenium Actions.
Actions actions = new Actions(driver);
actions.[1](Keys.SHIFT).perform();The keyDown method presses a key down without releasing it, which is needed to hold SHIFT.
Complete the code to release the SHIFT key after holding it down.
Actions actions = new Actions(driver);
actions.keyDown(Keys.SHIFT).[1](Keys.SHIFT).perform();The keyUp method releases a key that was pressed down earlier.
Fix the error in the code to hold CTRL key and press 'a' to select all text.
Actions actions = new Actions(driver); actions.keyDown(Keys.[1]).sendKeys("a").keyUp(Keys.CONTROL).perform();
The keyDown and keyUp methods must use the same key. Here, CTRL is used to select all text with 'a'.
Fill both blanks to hold ALT, press TAB, then release ALT to switch windows.
Actions actions = new Actions(driver); actions.[1](Keys.[2]).sendKeys(Keys.TAB).keyUp(Keys.ALT).perform();
To switch windows, hold ALT key down, press TAB, then release ALT key.
Fill all three blanks to hold SHIFT, type 'hello', then release SHIFT.
Actions actions = new Actions(driver); actions.[1](Keys.[2]).sendKeys("hello").[3](Keys.SHIFT).perform();
Hold SHIFT down to type uppercase 'HELLO', then release SHIFT key.
