TestNG Selenium WebElement找不到

时间:2018-10-02 10:08:11

标签: java selenium testng-dataprovider

下面是我的代码通过TestNG运行脚本。它找不到Web元素的用户名和我收到的错误(附有屏幕快照)。请建议在此处输入图片描述 enter image description here @Test

System.setProperty("webdriver.chrome.driver", "C:/Selenium/chromedriver.exe");
WebDriver Driver = new ChromeDriver();
String baseURL = "http://mapp.com";
Driver.get(baseURL);
String UserName = "*****";
String Password = "*****";
WebElement username = Driver.findElement(By.cssSelector("input#Login"));

0 个答案:

没有答案