0

Trying to open google in browser using python and selenium, gave me following errors:(Image of errors)

DevTools listening on ws://127.0.0.1:57033/devtools/browser/45f6818b-0d1e-4b81-9 637-861b579c7470 [0901/085753.496:ERROR:gl_surface_egl.cc(863)] eglInitialize D3D9 failed with er ror EGL_NOT_INITIALIZED [0901/085753.496:ERROR:gl_initializer_win.cc(232)] GLSurfaceEGL::InitializeOneOf f failed. [0901/085753.502:ERROR:viz_main_impl.cc(201)] Exiting GPU process due to errors during initialization [7188:10216:0901/085753.819:ERROR:gpu_process_transport_factory.cc(1016)] Lost U I shared context. [0901/085753.912:ERROR:command_buffer_proxy_impl.cc(113)] ContextResult::kFatalF ailure: Shared memory handle is not valid [0901/085753.962:ERROR:command_buffer_proxy_impl.cc(113)] ContextResult::kFatalF ailure: Shared memory handle is not valid

It starts chrome browser, also opens the link, but it is giving error in back...

print("Starting...")

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select

print("Opening...")
driver = webdriver.Chrome()
driver.get('https://google.com')
Grass
  • 185
  • 2
  • 14
  • 2
    Grass, it will be more useful to you and readers if you write the errors in the question instead of the image... – Chirag Jain Aug 31 '18 at 19:18
  • Possible duplicate of [this question](https://stackoverflow.com/q/48028782/1735215). There, the solution was to update to ChromeDriver 2.35. What ChromeDriver version are you using? – 0range Aug 31 '18 at 21:07
  • I am running latest `chromedriver`, latest `selenium` and latest `chrome browser` – Grass Sep 01 '18 at 03:26
  • webdriver.chrome() needs the path of the driver exe as param..so how are you even able to the browser.. – iamklaus Sep 01 '18 at 03:52
  • @SarthakNegi `chromedriver` is in the same folder where my script is there.... – Grass Sep 01 '18 at 04:01
  • Also, I tried `webdriver.C hrome('C:\Python\Scripts\chromedriver.exe)`, `webdriver.Chrome('chromedriver.exe')`, `webdriver.Chrome('D:\myprojects\chromedriver.exe')` as my **script file is located at "D:\myprojects"** then also it **returned same error**.... – Grass Sep 01 '18 at 04:02
  • Any updates @SarthakNegi – Grass Sep 01 '18 at 12:05
  • @Grass use this - `webdriver.Chrome(r'D:\myprojects\chromedriver.exe')` – Shivam Mishra Sep 01 '18 at 13:36
  • @ShivamMishra then also it is giving me the same error... – Grass Sep 01 '18 at 13:50
  • The problem may be that no one can reproduce the error. On Linux, the code works fine with or without giving the path to chromedriver explicitly. Maybe we need to see more output to see where it is going wrong. You may be able to generate more output with `webdriver.Chrome(service_args=["--verbose", "--log-path=D:\\myprojects\logfile.log"])`, or, if you want to state the path to the executable explicitly: `webdriver.Chrome(executable_path="D:\\myprojects\chromedriver.exe", service_args=["--verbose", "--log-path=D:\\myprojects\logfile.log"])` – 0range Sep 03 '18 at 12:39
  • Have a look at [this image](https://imgur.com/Farpl4S), @0range . Error came when I tried, `driver = webdriver.Chrome(service_args=["--verbose", "--log-path=D:\\myprojects\logfile.log"])` – Grass Sep 05 '18 at 11:22
  • @Grass Can you also post the log file? – 0range Sep 13 '18 at 16:21

0 Answers0