You can input data in text fields using below options
1) send keys
2) check whether it is in iframe
3) Action class
Hi Shanmukh, m using SendKeys to type the text but not able to enter the text in User name of Gmail page.
Note: M creating script for Module 23, Data Driven Core Framework.
Instructor
Ashish Thakur Replied on 13/11/2018
This code is working for me:
public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);
driver.get("https://gmail.com");
driver.findElement(By.id("identifierId")).sendKeys("Hello");
}?
But Ashish, m using Locator Key to identify the element and it is not working.
Kindly have a lok at the code i have written in attached file.
Instructor
Ashish Thakur Replied on 13/11/2018
After looking at this, all I can tell you is - Please debug your code
Something is going wong. May be its coming null
its very tough to comprehend and find the reason from the attachment
Thanks Ashish, Kindly close this question.