fill_form_field's RETURN entry might be too much
palewire opened this issue · 2 comments
I've come across a case where I want to enter text into a form field, but I don't know what the browser to register an enter key hit. That makes this helper a little more than I bargained for. Obviously debatable, but I wonder if it might be too much and the form filling and enter hitting should be separated into two separate functions.
If you agree, I'd be happy to submit a PR.
https://github.com/biglocalnews/court-scraper/blob/master/court_scraper/base/selenium_helpers.py#L12
@palewire Two new methods (one for populating the form field and a second to hit the enter key) could be a good addition, but I'd vote to leave in place the current behavior of fill_form_field
in order to avoid the need to refactor Odyssey and likely WI. Might be good to refactor form_fill_field
to use the two new methods, but changing it's behavior to no longer do send.keys()
may not be worth the trouble...
This is done.