You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/browsers.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,9 @@ Here is an example on how to do that:
9
9
```python
10
10
from botcity.web import WebBot, Browser
11
11
12
+
# Page Load Strategy
13
+
from botcity.web import PageLoadStrategy
14
+
12
15
# For Chrome
13
16
from botcity.web.browsers.chrome import default_options, default_capabilities
14
17
# For Firefox
@@ -24,13 +27,16 @@ class Bot(WebBot):
24
27
# Configure whether or not to run on headless mode
25
28
self.headless =False
26
29
30
+
self.page_load_strategy = PageLoadStrategy.NORMAL
31
+
27
32
# Fetch the default options for my preferred browser
28
33
# Pass in the headless, download_folder_path and user_data_dir
29
34
# to be used when building the default_options
30
35
def_options = default_options(
31
36
headless=self.headless,
32
37
download_folder_path=self.download_folder_path,
33
-
user_data_dir=None# Informing None here will generate a temporary directory
38
+
user_data_dir=None, # Informing None here will generate a temporary directory
39
+
page_load_strategy=self.page_load_strategy
34
40
)
35
41
36
42
# Add your customized argument
@@ -51,6 +57,14 @@ class Bot(WebBot):
51
57
...
52
58
```
53
59
60
+
## Page Load Strategy
61
+
62
+
Page Load Strategy is a browser option that determines how the browser will load the page.
63
+
64
+
::: botcity.web.browsers.PageLoadStrategy
65
+
rendering:
66
+
heading_level: 4
67
+
54
68
## Specific Browser Modules
55
69
56
70
Here are the documentation for the methods mentioned above for each of the supported browsers.
@@ -94,4 +108,4 @@ If you have any questions about the driver see [IE Driver Server Documentation](
94
108
95
109
See the [list of supported arguments in IE](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/hh826025(v=vs.85)).
96
110
97
-
During execution some errors may occur, [see the list of common errors](https://testguild.com/selenium-webdriver-fix-for-3-common-ie-errors/).
111
+
During execution some errors may occur, [see the list of common errors](https://testguild.com/selenium-webdriver-fix-for-3-common-ie-errors/).
0 commit comments