-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
the function do_something
is not very clear:
- it interacts with with elements on the
driver
's page,click
s it /send_keys
to it, and then returns the attributes of the firstchild
that was not interacted with yet. - it relies on a global variable
already_clicked_elems
. - it doesn't have a docstring or a meaningful name.
i think that, before creating a test for that method, we should first refactor it. a few options:
- refactor
crawler.py
into aCrawler
class, and keep thealready_clicked_elems
as a member; - refactor just
do_something
by making ityield
a child's attributes, that way aset
is no longer needed; - leave the global variable there for now and just focus on documentation.
either way, i think the function should be:
- renamed to something like
interact_with_clickable_chlid
, - given proper documentation + docstring,
- given type hints.
let me know what you think 🧇
Metadata
Metadata
Assignees
Labels
No labels