firefox_driver
FirefoxDriverFactory
Source code in libs\cafex_ui\src\cafex_ui\web_client\drivers\firefox_driver.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
__init__(firefox_options=None, firefox_preferences=None, proxies=None, grid_execution=False, run_on_browserstack=False, browserstack_username=None, browserstack_access_key=None, browserstack_capabilities=None)
Initializes the FirefoxDriverFactory with the given parameters.
Parameters
firefox_options : list, optional A list of options for the Firefox browser (default is None). firefox_preferences : dict, optional A dictionary of Firefox preferences (default is None). proxies : str, optional The proxies to be used (default is None). grid_execution : bool, optional A flag indicating whether to use grid execution (default is False). run_on_browserstack : bool, optional A flag indicating whether to run on BrowserStack (default is False). browserstack_username : str, optional The username for BrowserStack (default is None). browserstack_access_key : str, optional The access key for BrowserStack (default is None). Examples
firefox_driver = FirefoxDriverFactory(project_path='/path/to/project') firefox_driver.firefox_options '/path/to/project'
Source code in libs\cafex_ui\src\cafex_ui\web_client\drivers\firefox_driver.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
create_driver(selenium_grid_ip=None)
Creates a WebDriver instance based on the provided parameters.
Parameters
selenium_grid_ip : str, optional The IP of the Selenium grid (default is None).
Returns
web_driver : WebDriver or None The created WebDriver instance, or None if an error occurs.
Raises
Exception If an error occurs while creating the Firefox driver.
Examples
firefox_driver = FirefoxDriverFactory(list_firefox_options=['--headless']) driver = firefox_driver.create_driver() driver.name 'firefox'
Source code in libs\cafex_ui\src\cafex_ui\web_client\drivers\firefox_driver.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
setup_options()
Sets up Firefox options based on the provided parameters.
Raises
Exception If an error occurs while setting up Firefox options.
Examples
firefox_driver = FirefoxDriverFactory() firefox_driver.setup_options()
Source code in libs\cafex_ui\src\cafex_ui\web_client\drivers\firefox_driver.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|