Skip to content

Commit f4cf0c4

Browse files
committed
STY: Make flake8 happy.
1 parent ce2ff6a commit f4cf0c4

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

botcity/web/bot.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)