Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

SwitchTo and element #1465

@samudurand

Description

@samudurand

Could someone explain to me why this code fails with a null exception when calling the "sendKeys" :

browser.driver.switchTo().frame(element(by.id('someIframeId')));
element(by.id('email')).sendKeys("somevalue");

While this works perfectly :

//Same line
browser.driver.switchTo().frame(element(by.id('someIframeId')));
//Different
browser.driver.findElement(by.id('email')).sendKeys("somevalue");

From what I read in the doc the "element" is the same as "findElement" except that it doesn't search for the element before an action is taken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions