try putting chrome and chromedriver in the same dir
Some checks failed
ChromeTests / build (3.12) (push) Failing after 54s
EdgeTests / build (3.12) (push) Successful in 54s
Pylint / build (3.12) (push) Successful in 10s

This commit is contained in:
Greg Gauthier 2024-07-24 10:40:41 +01:00
parent b1081bb5b0
commit 74af52c464
4 changed files with 5 additions and 7 deletions

View File

@ -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
View File

@ -7,4 +7,5 @@
.idea/
.vscode/
.venv/
drivers/
drivers/
chrome-linux64/

View File

@ -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.