try putting chrome and chromedriver in the same dir
This commit is contained in:
parent
b1081bb5b0
commit
74af52c464
@ -40,15 +40,15 @@ jobs:
|
||||
wget https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip
|
||||
unzip chrome-linux64.zip
|
||||
unzip chromedriver_linux64.zip
|
||||
mv chromedriver drivers
|
||||
mv chromedriver chrome-linux64
|
||||
|
||||
- name: Verify Installation
|
||||
run: |
|
||||
pwd
|
||||
echo ${{gitea.workspace}}
|
||||
export PATH=$PATH:${{gitea.workspace}}/chrome-linux64
|
||||
export PATH=$PATH:${{gitea.workspace}}/drivers
|
||||
which chrome
|
||||
which chromedriver
|
||||
chrome --version
|
||||
chromedriver --version
|
||||
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -7,4 +7,5 @@
|
||||
.idea/
|
||||
.vscode/
|
||||
.venv/
|
||||
drivers/
|
||||
drivers/
|
||||
chrome-linux64/
|
||||
|
@ -26,7 +26,7 @@ class BrowserDriver:
|
||||
|
||||
def chrome(headless=True):
|
||||
chrome_path = os.path.join(CWD, 'chrome-linux64', 'chrome')
|
||||
driver_path = os.path.join(CWD, 'drivers', 'chromedriver')
|
||||
driver_path = os.path.join(CWD, 'chrome-linux64', 'chromedriver')
|
||||
options = ChromeOptions()
|
||||
options.binary_location = chrome_path
|
||||
if headless:
|
||||
@ -50,9 +50,6 @@ def edge(headless=True):
|
||||
if platform.system() == 'Windows':
|
||||
driver_name += ".exe"
|
||||
edgedriver_loc = os.path.join(CWD, 'drivers', driver_name)
|
||||
|
||||
print("***** DRIVER DEFINED LOCATION *****")
|
||||
print(edgedriver_loc)
|
||||
if os.path.isfile(edgedriver_loc):
|
||||
print(f'\nThe file {edgedriver_loc} exists.\n')
|
||||
else:
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user