How to pass validated user input with in an input field of a webpage using Selenium and Python
问题 I want the user to type in her/his name then pass the user input to selenium so that it automatically types it in the search field for my website. Is possible to first input, press enter then trigger selenium to forward the input to the browser. Why is it not working? from selenium import webdriver import time browser = webdriver.Chrome('C:/Users/acer/Desktop/chromedriver') browser.get('website') x = str(input('Your name: ')) #user inputs name here if len(x) > 20: #the name van not be longer