我也尝试了所有Xpath
,css selector
,id
,class
和name
,但没有任何效果。我尝试过以前的解决方案,但它没有解决问题:
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Frontend {
public static void main(String args[])
{
System.setProperty("webdriver.chrome.driver", "D:\\chromedriverlatest.exe");
WebDriver driver=new ChromeDriver();
driver.get("https://genba.online");
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.manage().window().maximize();
driver.findElement(By.xpath("//*[@id='en-btn']")).click();//translate to english language
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.findElement(By.xpath("/html/body/div/div[1]/div/div/div[1]/div[1]/div/div[2]/div/a[2]")).click();//click on access button
driver.findElement(By.xpath("//*[@id='email']")).sendKeys("a@b.com");
driver.findElement(By.xpath("//*[@id='password']")).sendKeys("123456");
driver.findElement(By.xpath("//*[@id='rememberme']")).click();
driver.findElement(By.xpath("//*[@id='user_detail']/div[2]/div[2]/button")).click();
}
}