The following code works fine in firefox, but freezes during the call to find element in chrome:
from selenium import webdriver
import time
browser = webdriver.Chrome()
browser.implicitly_wait(30)
browser.get("http://www.google.com")
browser.find_element_by_id("gbqfq").send_keys("harry potter")
time.sleep(5)
browser.find_element_by_id("gb_2").click()
time.sleep(5)
browser.quit()
I'm running Win7 64 bit, chrome Version 27.0.1453.110 m, and chromedriver2 0.9 (r202974) (and added to my path), selenium 2.32.0, python 2.7.3.
Since this is my first attempt at using the chrome driver, I'm not sure if I'm missing something or I've found a defect.
The stacktrace seems to vary from execution to execution, I've attached screen shots of a few below:
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f24e0389-0fd7-46fd-a039-c0e1da2a66bd%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
I'm curious if the script I included above works for anyone else in chrome or if its just me having issues?
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8e4de9e9-21c6-4274-87ff-299ae56fae85%40googlegroups.com?hl=en-US.
I'm pretty sure I have the latest driver (found here).
I am aware that it would wait for up to 35 seconds before throwing an exception, however I could leave it for an hour and nothing would happen.
Also, I think its worth noting that the stack trace I linked previously was acquired by using ctrl+c after waiting some time for the function to complete (not sure how else I could do this as I'm somewhat new to python and am not currently using a IDE) and the first two lines ("ERROR:ipc_channel_win.cc(132)" and "ERROR:textfield.h(162)") are printed almost immediately as soon as the script attempts to click on "gb_2", not when I keyboard interrupt the execution like the rest of the trace.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9b162fb5-2d16-4c15-9558-6a2aa2203bc8%40googlegroups.com?hl=en-US.
service_args = ['--log-path=NUL'] browser = webdriver.Chrome(service_args=service_args)
service_args = ['--verbose', '--log-path=/dev/null']
driver = webdriver.Chrome(chrome_options = cr_options, service_args=service_args)