| bio | website | |
|---|---|---|
| location | Portland, OR | |
| age | ||
| visits | member for | 1 year, 7 months |
| seen | May 15 at 23:55 | |
| stats | profile views | 21 |
software quality assurance engineer, programmer, and all-around technology enthusiast
|
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 |
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='display: 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. |
|
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 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. ;-) |
|
Oct 19 |
comment |
How do I start the Internet Explorer WebDriver for Selenium in Python? I tried to post this as an answer, but I need 100 reputation points. That is a stupid requirement. |
|
Oct 19 |
comment |
How do I start the Internet Explorer WebDriver for Selenium in Python? So no one else has to go through this hassle, this is how you do it: # Create a new instance of the Internet Explorer driver browser = webdriver.Ie() You'll also want to do this "Protected Mode must be set to the same value (enabled or disabled) for all zones" in IE's security settings if your on Vista or Windows 7. |
|
Oct 19 |
comment |
Selenium: reuse existing browser session, instead of opening new windows? Funny, I was just reading about this this morning, and I think it will solve my browser windows problem. Thank you. |
|
Oct 17 |
comment |
How do I close the browser window at the end of a Selenium test? I tried with Firefox. .stop() doesn't work. .close() results in "Exception: ERROR Server Exception: sessionId should not be null; has this session been started yet?" |
|
Oct 13 |
comment |
How do I close the browser window at the end of a Selenium test? That may be what I'm encountering. I will test with another browser when I get a chance. |
|
Oct 12 |
comment |
How do I close the browser window at the end of a Selenium test? .quit() did not work |
|
Oct 12 |
comment |
How do I close the browser window at the end of a Selenium test? Okay. I will try .quit(). I found that .stop() will stop the server, but not close the window. |