Skip to content

Commit

Permalink
add deprecation info for phantomjs
Browse files Browse the repository at this point in the history
Signed-off-by: Tin Lai <[email protected]>
  • Loading branch information
soraxas committed Dec 15, 2022
1 parent 4296fc0 commit 1d01827
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions echo360/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .echo_exceptions import EchoLoginError

from pick import pick
import selenium
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
import selenium.common.exceptions as seleniumException
Expand Down Expand Up @@ -49,6 +50,17 @@ def __init__(
self._useragent = "Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25"
# self._driver = webdriver.PhantomJS()

if webdriver_to_use == "phantomjs":
selenium_major_version = int(selenium.__version__.split('.')[0])
if selenium_major_version >= 4:
print("============================================================")
print("WARNING: PhantomJS support had been removed in in selenium")
print(" version 4. If this app errors out later on, consider")
print(" installing earlier version of selenium.")
print(" e.g. pip3 install selenium==3.14")
print(" (see https://github.com/SeleniumHQ/selenium/blob/58122b261a5f5406da8e5252c9ab54c464da7aa8/py/CHANGES#L324)")
print("============================================================")

dcap = dict()
if use_local_binary:
if webdriver_to_use == "chrome":
Expand Down

0 comments on commit 1d01827

Please sign in to comment.