我在http://www.go2see.ru上的测试票搜索表单试图访问它的元素:按钮、字段。我需要填写第二个文本字段“目的地”。我使用以下代码并得到以下异常:
from splinter import Browser
browser = Browser()
# Fill in the url
browser.visit('http://www.go2see.ru')
#find and fill 2-nd text field (Destination), right of two air planes
browser.find_by_id('avia-to').first.find_by_tag('input').fill('Moscow')
File "/home/ada015/search_form_testing.py", line 9, in <module>
browser.find_by_id('avia-to').first.find_by_tag('input').fill('Moscow')
File "/usr/local/lib/python2.7/dist-packages/splinter/element_list.py", line 75, in __getattr__
self.__class__.__name__, name))
AttributeError: 'ElementList' object has no attribute 'fill'