1

I have the following code, and trying to connect to itunesconnect using selenium

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait

driver = webdriver.Firefox()

driver.get("https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa")
element = WebDriverWait(driver, 20).until(lambda driver : driver.find_element_by_id('appleId'))

But i was getting *** TimeoutException: Message: as below

*** TimeoutException: Message:
Stacktrace:
    at FirefoxDriver.prototype.findElementInternal_ (file:///var/folders/x1/1bwt313j0qvgdh5pfzpbpvcw0000gn/T/tmp27vpUf/extensions/[email protected]/components/driver-component.js:10770)
    at FirefoxDriver.prototype.findElement (file:///var/folders/x1/1bwt313j0qvgdh5pfzpbpvcw0000gn/T/tmp27vpUf/extensions/[email protected]/components/driver-component.js:10779)
    at DelayedCommand.prototype.executeInternal_/h (file:///var/folders/x1/1bwt313j0qvgdh5pfzpbpvcw0000gn/T/tmp27vpUf/extensions/[email protected]/components/command-processor.js:12661)
    at DelayedCommand.prototype.executeInternal_ (file:///var/folders/x1/1bwt313j0qvgdh5pfzpbpvcw0000gn/T/tmp27vpUf/extensions/[email protected]/components/command-processor.js:12666)
    at DelayedCommand.prototype.execute/< (file:///var/folders/x1/1bwt313j0qvgdh5pfzpbpvcw0000gn/T/tmp27vpUf/extensions/[email protected]/components/command-processor.js:12608)

Any idea of what's going wrong ?

1 Answer 1

2

The element is inside iframe, you need to switch to it first

driver.switch_to_frame('authFrame') # by frame id, can also be name or WebElement
element = WebDriverWait(driver, 20).until(lambda driver : driver.find_element_by_id('appleId'))

And to switch back

driver.switch_to_default_content()
Sign up to request clarification or add additional context in comments.

3 Comments

@shivakrishna Great :)
@shivakrishna I answered to you in the question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.