-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Significantly simplify logic to create webdriver instance (execute.py)
- avoids the problem associated with trying to add options to the webdriver instance - problem explained in extensive detail at #14 (reply in thread) - provides all options to the webdriver instance before returning the webdriver instance from configure_{specified}driver() function rather than separately providing options as an argument to the webdriver instance in the set_up_headless_{specified}driver() function which runs ONLY WHEN ListCreator is instantiated with headless=True - previously, check_driver() provided either the uninstantiated webdriver object or a reference to the configure_{specified}driver() function - NOTE that this reference did not invoke the function, and only provided a reference to the configure_{specified}driver() function which returned a webdriver instance when **invoked** - this structure made it difficult to add options to the webdriver instance since - the program assigned the return value of check_driver() to seleniumdriver - the program then instantiated the seleniumdriver directly inside the open_driver() function if headless was set to False - OR the program instantiated seleniumdriver upon **invoking** the set_up_headless_{specified}driver() inside the open_driver() function if headless was set to True - since check_driver() returned an uninstantiated object or function reference, the options argument needed to be provided as an argument to the seleniumdriver variable directly - this was not intuitive at all, so the changes in this commit should make adding and changing options significantly easier - see #14 (reply in thread) for more details
- Loading branch information
1 parent
64ad861
commit d90c29f
Showing
2 changed files
with
55 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters