-
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,clicks it /send_keysto it, and then returns the attributes of the firstchildthat 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.pyinto aCrawlerclass, and keep thealready_clicked_elemsas a member; - refactor just
do_somethingby making ityielda child's attributes, that way asetis 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 🧇
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels