📜  如何在 selenium python 代码示例中输入

📅  最后修改于: 2022-03-11 14:46:34.300000             🧑  作者: Mango

代码示例1
from selenium.webdriver.common.keys import Keys
tb.send_keys(Keys.ENTER)


## In some pages, there is no submit button to submit the query, instead, it requires
## hitting enter button to submit the query.
## So in that case, we need to press enter button.
## To do that we need to import the above module.
## Then after we need to specify the textbox (in my case,it is tb)
## for which we want to hit enter button and
## submit the query, and then using send_keys(), we need to 
## pass value inside it which is ENTER button.
## It worked in my case, hope it work for yours :)