If you open this link https://www.phptravels.net/ it shows a progress bar kind of thing and then you will see the Hotels option on the top right corner. I have tried implicit wait, WebDriverWait and fluent wait as well. when I used element.isDisplayed() it shows "true" but when I perform click operation it throws below exception.
driver.manage().window().maximize();
driver.get("https://www.phptravels.net/");
String hotelsXpth = "//ul[@class='main-menu go-left RTL']/li/a/span[contains(text(),'Hotels')]";
WebDriverWait wait = new WebDriverWait(driver, 20);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath
(hotelsXpth)));
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(
hotelsXpth)));
System.out.println(driver.findElement(By.xpath(hotelsXpth)).isDisplayed());
driver.findElement(By.xpath(hotelsXpth)).click();
Exception
org.openqa.selenium.WebDriverException: unknown error: Element <span>...
</span> is not clickable at point (705, 130). Other element would receive
the click: <div id="preloader" class="loader-wrapper">...</div>
(Session info: chrome=63.0.3239.132)
(Driver info: chromedriver=2.33.506120
(e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.14393
x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-
01T18:33:54.468Z'
System info: host: 'D-113060768', ip: '10.149.34.102', os.name: 'Windows
10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptSslCerts: true, applicationCacheEnabled: false,
browserConnectionEnabled: false, browserName: chrome, chrome:
{chromedriverVersion: 2.33.506120 (e3e53437346286..., userDataDir:
C:\Users\AS337139\AppData\L...}, cssSelectorsEnabled: true, databaseEnabled:
false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true,
locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents:
true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform:
XP, platformName: XP, rotatable: false, setWindowRect: true,
takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: ,
unhandledPromptBehavior: , version: 63.0.3239.132, webStorageEnabled: true}
Session ID: bbfef8e4da0b2a6b98181d54c454d504
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
Any suggestions?