Python 使用Splinter在表单中输入字符串
我试图在Amazon页面的表单中输入字符串。我做错了什么Python 使用Splinter在表单中输入字符串,python,python-3.x,splinter,Python,Python 3.x,Splinter,我试图在Amazon页面的表单中输入字符串。我做错了什么 from splinter import Browser import time url = 'https://sellercentral.amazon.com/fba/profitabilitycalculator/index?lang=en_US' executable_path = {'executable_path': 'chromedriver.exe'} browser = Browser('chrome', **exec
from splinter import Browser
import time
url = 'https://sellercentral.amazon.com/fba/profitabilitycalculator/index?lang=en_US'
executable_path = {'executable_path': 'chromedriver.exe'}
browser = Browser('chrome', **executable_path, headless=False)
browser.visit(url)
time.sleep(2)
browser.find_by_id('search-form').first.type('Steve Jobs')
time.sleep(5)
browser.quit()
更新:
我可以通过以下方式单击表单:
browser.find_by_xpath(".//form//input[@type='text']").first.click()
但是,我无法填写表格