Error :Unable To Click On the City "Done " Button (MMT) | Selenium Forum
M
Posted on 09/11/2015
Hi Guys ,
I am not able to move after Entering City on the MMT city box.
step-1 Script----------------------------------------------------------------------
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class Implicit_Chrome {

public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver", "C:\\ChromeDriver.exe");
WebDriver driver=new ChromeDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("http://www.makemytrip.com/holidays/international/search?depCity=&isDestHoliday=true&selectedTabName=&dest=Mauritius&channel=onsite&intid=OBTLP_row1a_OBT_Mauritius_10092015");

WebElement CityBox=driver.findElement(By.xpath("//input[@class='flL dept_city_input fontSize11 RobotoLight ui-autocomplete-input']"));
CityBox.sendKeys("New Delhi");
driver.findElement(By.xpath("//*[@id='selectCity_btn']")).click();

}

}

------------------------------------------------------------------------------------
Error-->

Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 19376
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (496, 336). Other element would receive the click: <a class="ui-corner-all" tabindex="-1">...</a>
(Session info: chrome=46.0.2490.80)
(Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 6.1 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 924 milliseconds
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:30'
System info: host: 'DS-38607722D0E8', ip: '10.112.129.148', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_79'
Session ID: b6e974c5d7bbb880aa15b164369e3748
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=C:\Users\deepak-r\AppData\Local\Temp\scoped_dir3400_5093}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=46.0.2490.80, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, webStorageEnabled=true, hasTouchScreen=false, applicationCacheEnabled=false, takesScreenshot=true}]
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)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:268)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:79)
at Implicit_Chrome.main(Implicit_Chrome.java:20)

M
Replied on 11/11/2015

please reply


M
Replied on 12/11/2015

try to use this

[code:1bq1tia6]WebElement element = driver.findElement(By("element_path"));

Actions actions = new Actions(driver);

actions.moveToElement(element).click().perform():


[/code:1bq1tia6]