Core Framework_Not able to TYPE in text field using LocatorKey | Selenium Forum
H
Harsh Posted on 13/11/2018
Kindly help me as m not able to Type in text field using LocatorKey in Core Framework. Attaching BaseTest and DummyTestB code files.

S
Shanmukh kumar ch Replied on 13/11/2018

You can input data in text fields using below options
1) send keys
2) check whether it is in iframe
3) Action class


H
Harsh Replied on 13/11/2018

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.


A
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");
}?


H
Harsh Replied on 13/11/2018

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.


A
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


H
Harsh Replied on 08/05/2019

Thanks Ashish, Kindly close this question.