|
4 | 4 |
|
5 | 5 |
|
6 | 6 | class BrowserKeywords(LibraryComponent): |
7 | | - |
8 | 7 | def __init__(self, ctx): |
9 | 8 | LibraryComponent.__init__(self, ctx) |
10 | 9 |
|
11 | 10 | @keyword |
12 | 11 | def open_browser(self, host): |
13 | | - url = f'http://{host}.com/' |
| 12 | + url = f"http://{host}.com/" |
14 | 13 | browser_management = BrowserManagementKeywords(self.ctx) |
15 | | - browser_management.open_browser(url, 'chrome') |
| 14 | + browser_management.open_browser(url, "chrome") |
16 | 15 |
|
17 | 16 |
|
18 | 17 | class DesiredCapabilitiesKeywords(LibraryComponent): |
19 | | - |
20 | 18 | def __init__(self, ctx): |
21 | 19 | LibraryComponent.__init__(self, ctx) |
22 | 20 |
|
23 | 21 | @keyword |
24 | 22 | def get_browser_desired_capabilities(self): |
25 | | - self.info('Getting currently open browser desired capabilities') |
| 23 | + self.info("Getting currently open browser desired capabilities") |
26 | 24 | return self.driver.desired_capabilities |
27 | 25 |
|
28 | 26 |
|
29 | 27 | class Decomposition(SeleniumLibrary): |
30 | | - |
31 | | - def __init__(self, timeout=5.0, implicit_wait=0.0, |
32 | | - run_on_failure='Capture Page Screenshot', |
33 | | - screenshot_root_directory=None): |
34 | | - SeleniumLibrary.__init__(self, timeout=timeout, implicit_wait=implicit_wait, |
35 | | - run_on_failure=run_on_failure, |
36 | | - screenshot_root_directory=screenshot_root_directory) |
37 | | - self.add_library_components([BrowserKeywords(self), |
38 | | - DesiredCapabilitiesKeywords(self)]) |
| 28 | + def __init__( |
| 29 | + self, |
| 30 | + timeout=5.0, |
| 31 | + implicit_wait=0.0, |
| 32 | + run_on_failure="Capture Page Screenshot", |
| 33 | + screenshot_root_directory=None, |
| 34 | + ): |
| 35 | + SeleniumLibrary.__init__( |
| 36 | + self, |
| 37 | + timeout=timeout, |
| 38 | + implicit_wait=implicit_wait, |
| 39 | + run_on_failure=run_on_failure, |
| 40 | + screenshot_root_directory=screenshot_root_directory, |
| 41 | + ) |
| 42 | + self.add_library_components( |
| 43 | + [BrowserKeywords(self), DesiredCapabilitiesKeywords(self)] |
| 44 | + ) |
0 commit comments