I have observed that there is a space in your xpath and the URL is different too..
Use below code:-
driver.findElement(By.xpath("//img[@src='./pics/logo/home/EMLogoMini.jpg']")).click();
Or use cssSelector as below :-
driver.findElement(By.cssSelector("img[src='./pics/logo/home/EMLogoMini.jpg']")).click();
List<WebElement> list=driver.findElements(By.xpath("//img[@src='./pics/logo/home/EMLogoMini.jpg']"));
for(WebElement e : list){
e.click();
}
How to click by different ways:-
If your problem is that the element is scrolled off the screen (and as a result under something like a header bar), you can try scrolling it back into view like this:
private void scrollToElementAndClick(WebElement element) {
int yScrollPosition = element.getLocation().getY();
js.executeScript("window.scroll(0, " + yScrollPosition + ");");
element.click();
}
if you need you could also add in a static offset (if for example you have a page header that is 200px high and always displayed):
public static final int HEADER_OFFSET = 200;
private void scrollToElementAndClick(WebElement element) {
int yScrollPosition = element.getLocation().getY() - HEADER-OFFSET;
js.executeScript("window.scroll(0, " + yScrollPosition + ");");
element.click();
}
If still not work then use JavascriptExecutor
WebElement element= driver.findElement(By."Your Locator"));
JavascriptExecutor executor = (JavascriptExecutor) driver;
executor.executeScript("arguments[0].click();", element);
Hope it will help you :)