C
C
Chuvava2017-11-06 12:49:40
Automation
Chuvava, 2017-11-06 12:49:40

How to fill in the login and password fields on the updated page (autotest)?

I'm just getting started with autotesting.
I am writing an autotest (I use selenium and c#) for this site onliner.by
First you need to go through authorization, using xPath I find the "Login" button
and click - everything is in order.
Then the page is updated, fields for entering a login and password appear, but the page address remains the same ( http://onliner.by).
I also copied the Xpaths of these elements, but this code does not work:

driver.FindElement(By.XPath("//*[@id='auth-container__forms']/div/div[2]/form/div[1]/div[1]/input")).SendKeys("user");
driver.FindElement(By.XPath("//*[@id='auth-container__forms']/div/div[2]/form/div[1]/div[2]/input")).SendKeys("password");
driver.FindElement(By.XPath("//*[@id='auth-container__forms']/div/div[2]/form/div[3]/div/button")).Click();

How can I find and fill in these elements?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Chuvava, 2017-11-06
@Chuvava

5a0031c104110537106996.jpeg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question