1
Excpetion "org.openqa.selenium.WebDriverException: Element is obscured "

Open 1 Answers 710 Views Selenium

I am using EdgeDriver to run my framework in Edge browser of Windows 10 OS with build 10586 version 1511. However, I have searched for many sites for the resolution of the error occuring to me which is given below:

org.openqa.selenium.WebDriverException: Element is obscured (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 5 milliseconds Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03' System info: host: 'abcdef', ip: '172.23.12.188', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101' Driver info: org.openqa.selenium.edge.EdgeDriver Capabilities [{acceptSslCerts=true, browserVersion=25.10586.0.0, platformVersion=10, browserName=MicrosoftEdge, takesScreenshot=true, pageLoadStrategy=normal, takesElementScreenshot=true, platformName=windows, platform=ANY}] Session ID: 4CA02D0E-AD71-48BF-B588-5E5CCE4F6968 Command duration or timeout: 722 milliseconds Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:32:46' System info: host: 'abcdef', ip: '172.23.12.188', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101' Driver info: org.openqa.selenium.remote.RemoteWebDriver Capabilities [{acceptSslCerts=true, webdriver.remote.sessionid=b755d4dc-8e2a-4cac-ba41-223d2f2b107e, browserVersion=25.10586.0.0, platformVersion=10, browserName=MicrosoftEdge, takesScreenshot=true, pageLoadStrategy=normal, takesElementScreenshot=true, javascriptEnabled=true, platformName=windows, cssSelectorsEnabled=true, platform=ANY}] Session ID: b755d4dc-8e2a-4cac-ba41-223d2f2b107e at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327) at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85) at com.travelclick.reservation.page.web3.BasePage.click(BasePage.java:201) at com.travelclick.reservation.page.web3.SelectDatesPage.clickDateOnSelectPage(SelectDatesPage.java:180) at com.travelclick.reservation.page.web3.SelectDatesPage.clickOnCheckInDate(SelectDatesPage.java:82) at com.travelclick.reservation.page.web3.SelectDatesPage.selectDates(SelectDatesPage.java:212) at com.travelclick.reservation.workflow.web3.Reservation.selectDatesStep(Reservation.java:122) at com.travelclick.reservation.workflow.web3.Reservation.selectDatesStep(Reservation.java:117) at com.travelclick.reservation.workflow.web3.Reservation.createReservation(Reservation.java:43) at com.travelclick.reservation.util.ReservationUtil.reservationExecute(ReservationUtil.java:1216) at com.travelclick.reservation.test.helper.ReservationTestHelper.withoutEnhancementsAndServices(ReservationTestHelper.java:28) at com.travelclick.reservation.test.web3.RegularReservationTest.withoutEnhancementsAndServices(RegularReservationTest.java:19) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.openqa.selenium.remote.ScreenshotException: Screen shot has been taken Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:32:46' System info: host: 'derajs', ip: '172.27.60.136', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101' Driver info: driver.version: RemoteWebDriver at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:138) ... 28 more Caused by: org.openqa.selenium.WebDriverException: Element is obscured (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 5 milliseconds Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03' System info: host: 'derajs', ip: '172.27.60.136', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101' Driver info: org.openqa.selenium.edge.EdgeDriver Capabilities [{acceptSslCerts=true, browserVersion=25.10586.0.0, platformVersion=10, browserName=MicrosoftEdge, takesScreenshot=true, pageLoadStrategy=normal, takesElementScreenshot=true, platformName=windows, platform=ANY}] Session ID: 4CA02D0E-AD71-48BF-B588-5E5CCE4F6968 Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:32:46' System info: host: 'derajs', ip: '172.27.60.136', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101' Driver info: driver.version: RemoteWebDriver at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327) at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85) at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1.invoke(EventFiringWebDriver.java:335) at com.sun.proxy.$Proxy2.click(Unknown Source) at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:348) at org.openqa.selenium.remote.server.KnownElements$1.invoke(KnownElements.java:64) at com.sun.proxy.$Proxy3.click(Unknown Source) at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:30) at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:1) at java.util.concurrent.FutureTask.run(Unknown Source) at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) ... Removed 25 stack frames
 
 
 
 
 
Please help me as this is a complete SHOW-STOPPER for me to complete my execution successfully in EdgeBrowser.
Please provide some instant and satisfactory solution.


Thanks

1 Answer

0

This is known issue. Workaround for this is to use java script executor.

 

driver.executeScript("arguments[0].click()",yourElementHere);

 

Let us know your feedback after trying about script.

answered Sep 22, 2016 by stbadmin (4,970 points)
...