and the error is
Sep 07, 2017 12:12:35 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel’s Law holds true on the remote end
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Sep 07, 2017 12:12:59 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {ELEMENT=1}
Build info: version: ‘unknown’, revision: ‘1969d75’, time: ‘2016-10-18 09:43:45 -0700’
System info: host: ‘Admin-PC’, ip: ‘192.168.0.186’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_92’
Driver info: driver.version: AndroidDriver
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:375)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:62)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:417)
at io.appium.java_client.DefaultGenericMobileDriver.findElementById(DefaultGenericMobileDriver.java:70)
at io.appium.java_client.AppiumDriver.findElementById(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.findElementById(AndroidDriver.java:1)
at org.openqa.selenium.By$ById.findElement(By.java:218)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:360)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:58)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)
at pack3.Call1.main(Call1.java:34)
Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:373)
… 13 more
The is in this line ------ driver.findElement(By.id(“com.android.contacts:id/one”)).click();
As you suggested I changed the selenium version now I am not getting any error but not able to click on the element. I tried element.isDisplayed() method it is showing but not able click on the element.
Can u help on in this?
Sorry for late reply… I tried but getting the below error
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘ADMIN-PC’, ip: ‘192.168.43.194’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_92’
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{appPackage=com.android.contacts, deviceScreenSize=720x1280, networkConnectionEnabled=true, warnings={}, databaseEnabled=false, deviceName=35b4ac187d63, platform=LINUX, deviceUDID=35b4ac187d63, appActivity=com.android.contacts.activities.TwelveKeyDialer, desired={appPackage=com.android.contacts, appActivity=com.android.contacts.activities.TwelveKeyDialer, platformVersion=6.0, automationName=Appium, platformName=Android, deviceName=35b4ac187d63, autoAcceptAlerts=true}, platformVersion=6.0.1, webStorageEnabled=false, locationContextEnabled=false, automationName=Appium, takesScreenshot=true, javascriptEnabled=true, deviceModel=Redmi 3S, deviceManufacturer=Xiaomi, platformName=LINUX, autoAcceptAlerts=true}]
Session ID: f3a89336-880c-4c2b-b1c9-f5603e812788
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:215)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:89)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at io.appium.java_client.PerformsTouchActions.performTouchAction(PerformsTouchActions.java:41)
at io.appium.java_client.TouchAction.perform(TouchAction.java:325)
at pack3.Call1.main(Call1.java:87)
No I tried with so many options, at last even re-install each and every software but not able to resolve the issue. If you get any solution please post the code or fixed patch
Yes, Combination of versions of selenium and appium client matters a lot. I am facing so many issues. Almost new issues with any APP i look to automate. Some links suggest to downgrade even selenium to lower version instead of 3.3.
This is very bad, means how we can judge the compatible jar files b/w Appium and selenium…
From past 2 week I stuck with same problem…
Please if any have the solution on this???
Can anyone provide me the code to click on dail pad in mobile and required jar file versions
finally, screen shot of sdk manager to show what are all installed in it ?