I always end up getting the below errors
1. The method assertTrue(boolean) in the type Assert is not applicable for the arguments
(WebElement)
2. The method assertFalse(boolean) in the type Assert is not applicable for the arguments
(WebElement)
Please find my code as below:
package mypackage;
import org.openqa.selenium.By;
import org.testng.Assert;
import org.testng.annotations.Test;
@Test
public class WebDriverClass extends TestNGTest {
public void mainProgram () {
driver.get("http://www.wikipedia.org/");
driver.findElement(By.id("searchInput")).sendKeys("Selenium Software");
driver.findElement(By.name("go")).click();
driver.findElement(By.cssSelector(".mw-search-results li:nth-child(1) a")).click();
Assert.assertFalse(driver.findElement(By.cssSelector("img[src='//upload.wikimedia.org/wikipedia/en/5/5c/Seleniumlogo.png']"))).isDisplayed();
}
}
I am stuck at this point from two days.
Kindly help.
Thanks