I haven't figured out how to install Chrome Driver for about 8 hours. I've done a lot of research and I've never tried one. Here is the contents of my Deployment package file: http://prntscr.com/o4kcjw I got quite a lot of errors when I tried it through the serverless CLI. How can I solve this problem?
I create and assign selenium, pymsql and chromedriver to Lambda with virtualenv. (Zipped) I have a python file inside my zipped file.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--window-size=960x900')
# Define browser driver
chrome_driver = '/chromedriver-Linux64.exe'
browser = webdriver.Chrome(executable_path=chrome_driver, chrome_options=chrome_options)
{ "errorMessage": "Message: 'chromedriver-Linux64.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home\n",
"errorType": "WebDriverException", "stackTrace": [ " File \"/var/lang/lib/python3.7/imp.py\", line 234, in load_module\n return load_source(name, filename, file)\n", " File \"/var/lang/lib/python3.7/imp.py\", line 171, in load_source\n module = _load(spec)\n", " File \"\", line 696, in _load\n", " File \"\", line 677, in _load_unlocked\n", " File \"\", line 728, in exec_module\n", " File \"\", line 219, in _call_with_frames_removed\n", " File \"/var/task/scraping.py\", line 16, in \n browser = webdriver.Chrome(executable_path=chrome_driver, chrome_options=chrome_options)\n", " File \"/var/task/selenium/webdriver/chrome/webdriver.py\", line 73, in init\n self.service.start()\n", " File \"/var/task/selenium/webdriver/common/service.py\", line 83, in start\n os.path.basename(self.path), self.start_error_message)\n" ] }