public class testFluent {
WebDriver driver;
@Before
public void setUp(){
driver = new FirefoxDriver();
driver.manage().window().ma
Regarding your By.id
statement, it looks like you have passed an XPath instead of just the id. So this:
element = myDynamicElement(By.id("//*[@id='p_13838465-p']")); //this locator is an XPath
should become this:
element = myDynamicElement(By.id('p_13838465-p')); //this is just the ID
However, if this ID is dynamically generated, then it won't work reliably, and you may need to considering finding it by a different locator.
Then, once you've identified the element, to type in it, you use .sendKeys("your text here")
, like this:
element.sendKeys("your text here");
or you could combine it into one line by skipping the element =
part and just say:
myDynamicElement(By.id('p_13838465-p')).sendKeys("your text here");