Hot answers tagged

2

WebDriver block = driver.findElement(By.xpath("//*[@id=\"www-wikipedia-org\"]/div[11]/div[3]")); A WebDriver is not an WebElement; objects of these types are in different objects hierarchies. https://www.javadoc.io/doc/org.seleniumhq.selenium/selenium-api/2.50.1/org/openqa/selenium/WebDriver.html https://www.javadoc.io/static/org....


2

I think your biggest issue here, while not strictly test related, is your understanding of what the code you've written does (versus what it is supposed to do). What your code currently does If your only return statement is return null you will always get null as a return value, which is usually not useful. With that out of the way, let's talk about what we ...


Only top voted, non community-wiki answers of a minimum length are eligible