Python Spynner Filling HTML Fields -
i'm trying fill fields on http://www.united.com/web/en-us/apps/booking/flight/searchaward.aspx?sb=1&cs=n.
however, can't work.
as example, "from" field in "where , when want fly?" box.
import spynner b = spynner.browser() b.show() b.load('http://www.united.com/web/en-us/apps/booking/flight/searchaward.aspx?sb=1&cs=n') b.wk_fill('input[name=ctl00$contentinfo$searchform$airports1$origin$txtorigin]', 'london, england (lhr - heathrow)') b.browse() # see what's going on.
when try this, field isn't filled. appreciated!
you need use quotes
b.wk_fill('input[name="ctl00$contentinfo$searchform$airports1$origin$txtorigin"]', 'london, england (lhr - heathrow)')
with quotes works fine.
p.s. sorry bad english.
Comments
Post a Comment