Reputation
635
Top tag
Next privilege 750 Rep.
See votes, expandable usercard
Badges
6 11 24
Newest
 Yearling
Impact
~241k people reached

  • 0 posts edited
  • 0 helpful flags
  • 15 votes cast
Nov
22
comment WebDriver API: 'Failed to send keys because cannot focus element' — better workaround than using Firefox instead of Chrome?
.click() fails on the element. Firefox and IE can use ii. It's a bug in ChromeDriver.exe code.google.com/p/selenium/issues/detail?id=2328
Nov
11
answered When is it OK not to have dedicated testers/QA team?
Nov
10
comment Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
It definitely would be faster than doing a webdriver wait, and I think you could import less too. But adds potential breakage if the developer ever decides to rename the function/etc.
Nov
9
comment Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
Cool idea, but I'm reluctant to do that, because I think one of the big benefits of WebDriver is that it drops the JS-injection that RC Server was doing. Seems like we get better cross-browser support that way.
Nov
7
comment Getting nose test runner to execute a test against multiple browsers / configurations?
What I ended up going was making a setup.cfg that my imported module reads from. It has a line to specify the browser. What I can do then is run nosetests each time after I changed the browser (the .cfg could be changed at the end of the tests in an autoamated fashion, of course). This doesn't really solve the problem, but it's at least more elegant than writing three test functions for each test, or doing something weird like copying the test folder three times.
Nov
1
accepted Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
Nov
1
comment Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
Finally got it using Jason's suggested method. Jason, can you please edit your answer to include this example code so it's not buried in comments? You'll need to format it too. elem = self.web.find_element_by_id('tos_agree') driver = self.web elem_visible = WebDriverWait(self.web, 2).until(lambda driver : \ elem.is_displayed()) elem.click()
Nov
1
comment Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
Okay, I think I got it working via elem = self.web.find_element_by_css_selector("div[class='promo_accepted'][style='displa‌​y: none;']"). However, Jason's solution sounds much cleaner / natively supported by WebDriver, so I'm going to try that now.
Nov
1
comment Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
It does. Right now I'm trying to figure out how to use a CSS selector plus the WebDriver wait function to check if it's visible.
Nov
1
comment Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
So I think what's happening is that WebDriver is finding the element, but when it finds it, it's still set to CSS display:none (or whatever). I need some way to check for CSS visibility without my wait function...
Nov
1
comment Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
I take it back. It is some kind of timeout issue. I did a quick and dirty sleep function in the Python, and now it's clickable. time.sleep(5) elem = self.web.find_element_by_id('tos_agree') elem.click()
Nov
1
comment Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
After more thought, I think it's not a timeout issue at all but a visibility issue. This might be the solution: stackoverflow.com/questions/6101461/…
Nov
1
comment Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
I think you guys are spot on with the JavaScript wait idea. Indeed this page is hiding elements via a JavaScript trigger. Unfortunately, I tried the wait function this morning and it still gives the not visible error: driver = self.web elem = WebDriverWait(self.web, 2).until(lambda driver : \ driver.find_element_by_id('tos_agree')) elem.click()
Nov
1
comment Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
I'm using 2.8.1 I believe. I easy-installed it for Python a couple weeks ago or so.
Nov
1
asked Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException
Oct
27
asked Getting nose test runner to execute a test against multiple browsers / configurations?
Oct
24
comment WebDriver API: 'Failed to send keys because cannot focus element' — better workaround than using Firefox instead of Chrome?
I have just started learning WebDriver recently, so I'm not sure how to do that. All I see is how to get the currently focused element (switch_to_active_element), not how to set focus.
Oct
21
asked WebDriver API: 'Failed to send keys because cannot focus element' — better workaround than using Firefox instead of Chrome?
Oct
20
answered What's the difference between “testing” and “quality assurance”?
Oct
20
comment How do I start the Internet Explorer WebDriver for Selenium in Python?
Fair enough. Yeah, I understand the need for such things. Some barrier to entry is always good for websites. Just frustrating when you are a "power user" and already know how things work. ;-)