0
package searchtest;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class betaLogin {
public static void main(String[] args) throws InterruptedException
{

  WebDriver driver = new FirefoxDriver();

  driver.get("http://beta-app.1bridge.in/#/auth/login");

  driver.findElement(By.xpath("//input[@type='text']")).sendKeys("RB0764",Keys.ENTER);
  Thread.sleep(3000);
  driver.findElement(By.xpath("//input[@type='password']")).sendKeys("kanna123",Keys.ENTER);

  Thread.sleep(4000);
  driver.findElement(By.xpath("//ul[6]/li/a/span[2]"));
  Thread.sleep(4000);
  driver.findElement(By.xpath("//ul[6]/li/ul/li/a/span[2]"));
  Thread.sleep(4000);
driver.findElement(By.className("ng-star-inserted"));
Thread.sleep(4000);
driver.get("http://beta-app.1bridge.in/#/rechargeManagement/transactions-list");
Thread.sleep(4000);  

}
}
  • What element are you trying to find? – tugo Feb 26 at 6:45
  • 1
    Please share the html dom and error stack trace. – Kshetra Mohan Prusty Feb 26 at 6:47
  • just remove the user name and password provided in the question and provide stack trace. Anyone can misuse it. – Vishal Feb 26 at 8:25
  • For starters, it takes a while for that page to load - you may be starting before it's finished loading. Your xpaths for user name and password are fine, but sendkeys does not take two parameters, only one, and you don't need the Keys.ENTER at all except in rare cases. All your other findElements do nothing with them, you're not locating or clicking the submit button. For lack of a longer explanation, place a fairly long sleep after the get and before the first findElement to let the page load. – Bill Hileman Mar 1 at 18:52

Your Answer

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

Browse other questions tagged or ask your own question.