System.setProperty("webdriver.firefox.marionette", "some directory"); WebDriver driver = new FirefoxDriver(); driver.get("https://www.playok.com/en/spades/"); driver.findElement(By.cssSelector("button.ckbut.but0")).click(); driver.findElement(By.cssSelector("button.lbpbg.ttup")).click(); WebElement username = driver.findElement(By.cssSelector("input#id")); username.sendKeys("some username"); WebElement password = driver.findElement(By.name("pw")); password.sendKeys("some password"); driver.findElement(By.cssSelector("input.bxpad.ttup")).click();//here a new page opens at the same window, which has a start button: driver.findElement(By.cssSelector("button.lbprm.ttup")).click();//here a new window opens which goes to the main game page and the url is still the same //but the following click doesnt work; actually no button works, doesnt matter if here a sleep() gets used, click won't work anyway. driver.findElement(By.cssSelector("button.butsys.minwd")).click();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)