Send multiple tab key presses with Selenium

前端 未结 6 889
栀梦
栀梦 2020-12-10 12:42

How can I send multiple tabs with Selenium?

When I run:

uname = browser.find_element_by_name("text")
uname.send_keys(Keys.TAB)
6条回答
  •  既然无缘
    2020-12-10 13:02

    As the OP states: "actually the next element from uname is selected".

    After the first key you have moved off the element, so no further s will be recognized by that element. You need to locate the parent element and send keys to it.

提交回复
热议问题