Skip to content

Instantly share code, notes, and snippets.

@carlosmmelo
Created December 11, 2014 19:01
Show Gist options
  • Save carlosmmelo/ff7dc2a7c8f11cf29e10 to your computer and use it in GitHub Desktop.
Save carlosmmelo/ff7dc2a7c8f11cf29e10 to your computer and use it in GitHub Desktop.
chromedriver cannot focus element
<div class="form-group" data-reactid=".0.0.1.1.1.0.0.3.1">
<label data-reactid=".0.0.1.1.1.0.0.3.1.0"></label>
<div class="Select" data-reactid=".0.0.1.1.1.0.0.3.1.1">
<input type="hidden" data-reactid=".0.0.1.1.1.0.0.3.1.1.0" value="" name="companyType"></input>
<div class="Select-control" data-reactid=".0.0.1.1.1.0.0.3.1.1.1">
<div class="Select-placeholder" data-reactid=".0.0.1.1.1.0.0.3.1.1.1.0:$placeholder"></div>
<div class="Select-input" data-reactid=".0.0.1.1.1.0.0.3.1.1.1.1" style="display:inline-block;"></div>
<span class="Select-arrow" data-reactid=".0.0.1.1.1.0.0.3.1.1.1.2"></span>
</div>
</div>
</div>
company_type_box = self.query_selector_css('div.form-group:nth-child(2) > div:nth-child(2) > div:nth-child(2)')
company_type_box.click()
company_type_box.send_keys(company_type)
company_type_select = self.query_selector_css('.Select-menu')
company_type_select.click()
WebDriverException: Message: unknown error: cannot focus element
(Session info: chrome=39.0.2171.71)
(Driver info: chromedriver=2.9.248307,platform=Mac OS X 10.10.1 x86_64)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment