samedi 26 décembre 2015

Selenium WebDriver how to insert text into field

I'm designing tests in Selenium WebDriver Framwework and I would like to insert text into fields in login box.

Here is a website http://ift.tt/1NQfrRE After click on "Zaloguj" button in top right corner, Login box appears. I would like to insert text into E-mail inputfield.

Here is my code:

WebElement emailInput =   driver.findElement(By.xpath("//[@id=\"inputFields\"]"));
emailInput.click();
emailInput.sendKeys("grzegorzrudniak@gmail.com");

After execution I get this error: org.openqa.selenium.ElementNotVisibleException: element not visible

Can anyone help me to insert text into this field? Please take a look at second input in this box, it's called "Hasło". Xpath of this two fields is the same. Additional question is how to insert text into "Hasło" inputfield as well?

Aucun commentaire:

Enregistrer un commentaire