Skip to content
CodeKruPro

Hold Shift while typing with ActionChains

QuizMediumPython onlyAsked in: Accenture, Capgemini, Infosys, TCS, Wipro

Which chain types hello into a focused field while holding Shift?

  • ActionChains(driver).key_down(Keys.SHIFT).send_keys("hello").key_up(Keys.SHIFT).perform()
  • field.send_keys(Keys.SHIFT, "hello") then perform()
  • ActionChains(driver).key_down(Keys.SHIFT).send_keys("hello") without perform()
  • ActionChains(driver).shift("hello").perform()

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in