Skip to content

Commit

Permalink
Remove deprecated functions (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfehler committed Jan 18, 2023
1 parent aa44f39 commit eb2fe03
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions splinter/driver/webdriver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import re
import tempfile
import time
import warnings
from contextlib import contextmanager
from typing import Optional

Expand Down Expand Up @@ -337,38 +336,6 @@ def execute_script(self, script, *args):
def evaluate_script(self, script, *args):
return self.driver.execute_script("return %s" % script, *args)

def is_element_visible_by_css(self, css_selector, wait_time=None):
warnings.warn(
f'browser.is_element_visible_by_css({css_selector}, {wait_time}) is deprecated.'
f' Use browser.find_by_css({css_selector}).is_visible({wait_time}) instead.',
FutureWarning,
)
return self.find_by_css(css_selector, wait_time).is_visible(wait_time)

def is_element_not_visible_by_css(self, css_selector, wait_time=None):
warnings.warn(
f'browser.is_element_not_visible_by_css({css_selector}, {wait_time}) is deprecated.'
f' Use browser.find_by_css({css_selector}).is_not_visible({wait_time}) instead.',
FutureWarning,
)
return self.find_by_css(css_selector, wait_time).is_not_visible(wait_time)

def is_element_visible_by_xpath(self, xpath, wait_time=None):
warnings.warn(
f'browser.is_element_visible_by_xpath({xpath}, {wait_time}) is deprecated.'
f' Use browser.find_by_xpath({xpath}).is_visible({wait_time}) instead.',
FutureWarning,
)
return self.find_by_xpath(xpath, wait_time).is_visible(wait_time)

def is_element_not_visible_by_xpath(self, xpath, wait_time=None):
warnings.warn(
f'browser.is_element_not_visible_by_xpath({xpath}, {wait_time}) is deprecated.'
f' Use browser.find_by_xpath({xpath}).is_not_visible({wait_time}) instead.',
FutureWarning,
)
return self.find_by_xpath(xpath, wait_time).is_not_visible(wait_time)

def is_element_present(self, finder, selector, wait_time=None):
wait_time = wait_time or self.wait_time
end_time = time.time() + wait_time
Expand Down

0 comments on commit eb2fe03

Please sign in to comment.