Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6898907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:21:17+00:00 2026-05-27T07:21:17+00:00

Using the following simplified test, webdriver fails to find the intended element no matter

  • 0

Using the following simplified test, webdriver fails to find the intended element no matter what sort of find_by call I use.

import unittest
from selenium import webdriver

class Setups(unittest.TestCase):
    def setUp(self):
        self.browser = webdriver.Ie()
        self.browser.implicitly_wait(15)

    def tearDown(self):
        self.browser.quit()

class IETest(Setups):
    def test_ietest(self):
        br = self.browser
        br.get("http://www.gmail.com")
        br.find_element_by_id("Email").send_keys("anything")

if __name__ == '__main__':
    unittest.main(verbosity=2)

After the implicit wait times out trying to find an element with id == Email the following error message appears in the output:

test_ietest (__main__.IETest) ... ERROR

======================================================================
ERROR: test_ietest (__main__.IETest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "V:\Automation\Tests\web_ietest.py", line 23, in test_ietest
    br.find_element_by_id("Email").send_keys("anything")
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", l
ine 172, in find_element_by_id
    return self.find_element(by=By.ID, value=id_)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", l
ine 525, in find_element
    {'using': by, 'value': value})['value']
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", l
ine 144, in execute
    self.error_handler.check_response(response)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py"
, line 118, in check_response
    raise exception_class(message, screen, stacktrace)
NoSuchElementException: Message: u'Unable to find element with id == Email'

----------------------------------------------------------------------
Ran 1 test in 19.707s

FAILED (errors=1)

Attempts to run the same test using find_by_xpath and find_by_css_selector returns the same result. Of course, the same example test runs without issue in Firefox.

Google has failed me, does anyone have any insight as to why IE refuses to locate page elements that are clearly present?

Technical info:

  • Windows 7 64-bit
  • Selenium 2.4.0
  • Python 2.7.1
  • Internet Explorer 8.0.7601.17514 64-bit

Some additional investigation proves that the page source is fully loaded and correct before the find_element is attempted. Adding the following line between the get(url) and the find_element_by_id call prints the page source and the element with an id of “Email” is present:

print unicode(br.page_source).encode("utf-8")

Attempting just print br.page_source throws some encoding error which is why the print line includes the unicode encoding stuff. Not sure if this is as expected when working with IE, or if the utf-8 encoding could be hampering my attempts to find elements.


So, I guess the real question is this: Has anyone successfully used the Webdriver Python API with 64bit Internet Explorer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:21:18+00:00Added an answer on May 27, 2026 at 7:21 am

    I was never able to solve this issue on IE8.

    After installing IE9, however, elements were able to be found as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Ninject 2.2, I have the following failing test (simplified): public interface IGenericView<T> {
I'm using the following (simplified) code to display an element in all the items
I'm using gcc 4.3.2. I have the following code (simplified): #include <cstdlib> template<int SIZE>
I am using the SQLite database and have the following persistent class (simplified): public
I am using following snippet to build a 32 bit integer to use with
In a Rails application using prototype, I have the following (simplified) code in my
I have the following code (simplified) int main() { ifstream myFile(input.txt); if(myFile.is_open()) cout<<test; }
When using the following code (simplified), I get the error Unable to cast the
I am using following PHP code to connect to MS Access database: $odb_conn =
I am using following storedprocedure set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO Alter PROCEDURE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.