How to set value in a text field with Java-TestNG?

How can I set value in a text field with Java-TestNG?

Hello Macy,

You can refer to this sample syntax below to set value in a test field:

driver.findElement(By.id("sampletodotext")).sendKeys("Yey, Let's add it to list");