I am converting the Selenium IDE code to Selenium webdriver. I am using Junit and I am very new to Junit and chromedriver.I am trying to click and close the (x) image in a modal window and tried the following line of code
driver.findElement(By.xpath("//img[contains(@src,'//baseUrl/Images/Icons/16x16/close.png')]"));
The element has img class, title and src.
Could somebody help to fix this line of code to close the modal window. Thanks