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