0

I am unable to click login form element below site:

http://www.w-trading.co.kr/member/login.php?

I try:

driver.FindElement(By.XPath("//*[@id='memberId']")).SendKeys("my_id");

and

driver.FindElement(By.Id("memberId")).SendKeys("my_id");

but each code occur error.

How can I solve this problem? Thanks for your watching.

I'm using Selenium in C#.

  • What are the errors that you are seeing in each case? – Brian Jul 12 at 20:37
  • Are you sure the page is loaded when you executing click action? If not you have to wait until the page loads. Better share the error you get for this code – Joe Sep 11 at 5:50
1

Do something more advance. Use a while that will wait for element.enabled to be true Inside the while do a try catch, in this try catch you will be asking if element enabled = true

The you do the click and then the send keys

  • You really should add a code sample to this. – Brian Aug 16 at 15:44
0

Try with :

  1. driver.FindElement(By.Id("memberID")).click();

  2. then driver.FindElement(By.Id("memberID")).sendKeys("Text");

0

You have 2 instances of the "memberId" Id attribute on the page. You need to interact with the second one.

Try this:

driver.FindElement(By.XPath("/descendant::input[@id='memberId'][2]")).SendKeys("my_id");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.