File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed
Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,21 @@ def options(self, options):
107107 """
108108 self ._options = options
109109
110+ @property
111+ def download_folder_path (self ):
112+ return self ._download_folder_path
113+
114+ @download_folder_path .setter
115+ def download_folder_path (self , folder_path ):
116+ """
117+ The download folder path to be used. Set it up before starting the Browser or browsing a URL or restart the
118+ browser after changing it.
119+
120+ Args:
121+ folder_path (str): The desired download folder path.
122+ """
123+ self ._download_folder_path = folder_path
124+
110125 @property
111126 def headless (self ):
112127 return self ._headless
@@ -1264,11 +1279,14 @@ def control_c(self, wait=0):
12641279 # is in an input of similar. While Firefox doesn't get its shit together we apply this
12651280 # ugly alternative so control+c works for "all" browsers tested so far.
12661281 cmd = """
1267- try {
1268- return document.activeElement.value.substring(document.activeElement.selectionStart,document.activeElement.selectionEnd);
1269- } catch(error) {
1270- return window.getSelection().toString();
1271- }
1282+ try {
1283+ return document.activeElement.value.substring(
1284+ document.activeElement.selectionStart,
1285+ document.activeElement.selectionEnd
1286+ );
1287+ } catch(error) {
1288+ return window.getSelection().toString();
1289+ }
12721290 """
12731291
12741292 self ._clipboard = self .execute_javascript (cmd )
You can’t perform that action at this time.
0 commit comments