I am trying to Login to Ebay site using Selenium. I have successfully identified the user name and password Text boxes using Xpath (and validated the xpaths using the Firefox Eval tool in Firebug).
public class LoginTestCase{
@Test
public void LoginEbay() throws InterruptedException
{
System.setProperty("webdriver.gecko.driver", "D:\\selenium_library\\geckodriver-v0.17.0-win64\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
//navigate to Ebay
driver.get("https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&ru=https%3A%2F%2Fwww.ebay.com%2F");
Thread.sleep(20000);
// Enter user name , password and click on Signin button
driver.findElement(By.xpath("//input[@placeholder='Email or username' AND @type='text']")).sendKeys("####@###");
//driver.findElement(By.xpath("//input[@placeholder='Password' AND @class='fld']']")).sendKeys("####");
driver.findElement(By.id("sgnBt")).click();
}
}
I am getting the below warning after which the script Fails.
1499976357508 geckodriver INFO Listening on 127.0.0.1:41809
1499976358783 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args ["-marionette"]
1499976367184 Marionette INFO Listening on port 62686
Jul 13, 2017 4:06:20 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
JavaScript warning: https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&ru=https%3A%2F%2Fwww.ebay.com%2F, line 170: unreachable code after return statement