Skip to content

Commit 723e9eb

Browse files
committed
Refactoring
1 parent 021bcc0 commit 723e9eb

File tree

5 files changed

+12
-16
lines changed

5 files changed

+12
-16
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,26 +1228,22 @@ def click_link_text(self, link_text, timeout=None):
12281228
if text_id:
12291229
link_css = '[id="%s"]' % link_text
12301230
found_css = True
1231-
12321231
if not found_css:
12331232
href = self.__get_href_from_link_text(link_text, False)
12341233
if href:
12351234
if href.startswith("/") or page_utils.is_valid_url(href):
12361235
link_css = '[href="%s"]' % href
12371236
found_css = True
1238-
12391237
if not found_css:
12401238
ngclick = self.get_link_attribute(link_text, "ng-click", False)
12411239
if ngclick:
12421240
link_css = '[ng-click="%s"]' % ngclick
12431241
found_css = True
1244-
12451242
if not found_css:
12461243
onclick = self.get_link_attribute(link_text, "onclick", False)
12471244
if onclick:
12481245
link_css = '[onclick="%s"]' % onclick
12491246
found_css = True
1250-
12511247
success = False
12521248
if found_css:
12531249
if self.is_element_visible(link_css):
@@ -1258,13 +1254,11 @@ def click_link_text(self, link_text, timeout=None):
12581254
success = self.__click_dropdown_link_text(
12591255
link_text, link_css
12601256
)
1261-
12621257
if not success:
12631258
element = self.wait_for_link_text_visible(
12641259
link_text, timeout=settings.MINI_TIMEOUT
12651260
)
12661261
element.click()
1267-
12681262
latest_window_count = len(self.driver.window_handles)
12691263
if (
12701264
latest_window_count > pre_window_count
@@ -1369,7 +1363,6 @@ def click_partial_link_text(self, partial_link_text, timeout=None):
13691363
if text_id:
13701364
link_css = '[id="%s"]' % partial_link_text
13711365
found_css = True
1372-
13731366
if not found_css:
13741367
href = self.__get_href_from_partial_link_text(
13751368
partial_link_text, False
@@ -1378,23 +1371,20 @@ def click_partial_link_text(self, partial_link_text, timeout=None):
13781371
if href.startswith("/") or page_utils.is_valid_url(href):
13791372
link_css = '[href="%s"]' % href
13801373
found_css = True
1381-
13821374
if not found_css:
13831375
ngclick = self.get_partial_link_text_attribute(
13841376
partial_link_text, "ng-click", False
13851377
)
13861378
if ngclick:
13871379
link_css = '[ng-click="%s"]' % ngclick
13881380
found_css = True
1389-
13901381
if not found_css:
13911382
onclick = self.get_partial_link_text_attribute(
13921383
partial_link_text, "onclick", False
13931384
)
13941385
if onclick:
13951386
link_css = '[onclick="%s"]' % onclick
13961387
found_css = True
1397-
13981388
success = False
13991389
if found_css:
14001390
if self.is_element_visible(link_css):
@@ -1405,13 +1395,11 @@ def click_partial_link_text(self, partial_link_text, timeout=None):
14051395
success = self.__click_dropdown_partial_link_text(
14061396
partial_link_text, link_css
14071397
)
1408-
14091398
if not success:
14101399
element = self.wait_for_partial_link_text(
14111400
partial_link_text, timeout=settings.MINI_TIMEOUT
14121401
)
14131402
element.click()
1414-
14151403
latest_window_count = len(self.driver.window_handles)
14161404
if (
14171405
latest_window_count > pre_window_count

seleniumbase/fixtures/words.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
2-
""" Small Dictionary """
2+
"""
3+
Small Dictionary for Demo Mode translations
4+
"""
35

46

57
class SD:

seleniumbase/plugins/base_plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
2-
""" This is the Nosetest plugin for setting base configuration and logging. """
2+
"""
3+
This is the Nosetest plugin for setting base configuration and logging.
4+
"""
35

46
import ast
57
import sys

seleniumbase/plugins/pytest_plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
2-
""" This is the pytest configuration file for setting test options. """
2+
"""
3+
This is the pytest configuration file for setting test options.
4+
"""
35

46
import colorama
57
import os

seleniumbase/plugins/selenium_plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
2-
""" This is the Nosetest plugin for setting Selenium test configuration. """
2+
"""
3+
This is the Nosetest plugin for setting Selenium test configuration.
4+
"""
35

46
import sys
57
from nose.plugins import Plugin

0 commit comments

Comments
 (0)