【发布时间】:2021-10-29 19:53:33
【问题描述】:
我正在尝试使用此代码填写网页上的输入字段:
from splinter import Browser
from bs4 import BeautifulSoup as bs
from webdriver_manager.chrome import ChromeDriverManager
from selenium import webdriver
executable_path = {'executable_path':ChromeDriverManager().install()}
browser = Browser('chrome', **executable_path, headless = False)
browser.visit('http://webapps2.rrc.state.tx.us/EWA/wellboreQueryAction.do')
**browser.find_by_name('searchArgs.leaseNumberArg').fill('searchArgs.leaseNumberArg',
'160895')**
我收到此错误: TypeError: fill() 接受 2 个位置参数,但给出了 3 个
我已使用相同的语法成功填充其他输入字段。据我所知,这里唯一的区别是输入字段名称包含一个“。”我认为这可能与某种数据结构的列有关。
有没有想过如何通过这个路障?
【问题讨论】:
标签: python-3.x