【发布时间】:2017-05-05 18:42:24
【问题描述】:
我正在编写 selenium 程序以登录到 Gmail 帐户。我已通过源代码提供用户名,进一步的步骤是单击下一步按钮。
package com.core.selenium;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Gmaildemo {
public static void main(String args[]) {
System.setProperty("webdriver.chrome.driver", "D:\\REKHA\\SOFTWARES\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("http://www.gmail.com");
driver.findElement(By.name("identifier")).sendKeys("rekha.sompalli@gmail.com");
driver.findElement(By.className("RveJvd snByac")).click();
}
}
出现以下错误。
线程“主”org.openqa.selenium.InvalidSelectorException 中的异常:无效选择器:不允许复合类名
出现以下错误。无法识别下一步按钮。
【问题讨论】:
标签: selenium