question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updating to latest Selenium and Selenium support NuGetPackages raises Casting issue

See original GitHub issue

Description

Updating to latest Selenium(v3.12.0) and selenium support (v3.12.0) NuGetPackages raises Casting issue It was working fine till earlier version v3.11.2

Environment

Appium version 1.8.0 Desktop OS/version used to run Appium: Windows 10 Pro Node.js version (unless using Appium.app|exe): 8.10.0 Mobile platform/version under test: Android API 25 ,v7.1.1 Real device or emulator/simulator: Real Device Samsung Tab Appium CLI or Appium.app|exe: both IDE: VisualStudio 2017 Enterprise and C# as coding language Selenium Driver and Selenium support driver : v3.12.0 (Issue creating version)

Selenium Driver and Selenium support driver v3.11.2 worked fine without any casting issues

Code To Reproduce Issue [ Good To Have ]

public static AndroidElement UserName_Field()

    {
        AndroidElement UserName = driver.FindElement(By.Id("*:id/LoginView_txtUsername"));
        return UserName;
    }

Ecxeption stacktraces

Test Name: TestMethod1 Test FullName: UnitTestProject1.UnitTest1.TestMethod1 Test Source: C:\Users\gokulnath.kumar\source\repos\UnitTestProject1\UnitTestProject1\UnitTest1.cs : line 25 Test Outcome: Failed Test Duration: 0:00:53.4154213

Result StackTrace:

at OpenQA.Selenium.Appium.AppiumDriver`1.FindElement(By by) at *_Mobile.Page_Objects.Login_Objects.UserName_Field() in C:\Users\gokulnath.kumar\source\repos\UnitTestProject1\UnitTestProject1\Page_Objects\Login_Objects.cs:line 21 at *_Mobile.Log_in_module.Login_module.Login(String Uname, String Pwd) in C:\Users\gokulnath.kumar\source\repos\UnitTestProject1\UnitTestProject1\App_Modules\Login_module.cs:line 18 at UnitTestProject1.UnitTest1.TestMethod1() in C:\Users\gokulnath.kumar\source\repos\UnitTestProject1\UnitTestProject1\UnitTest1.cs:line 27 Result Message: Test method UnitTestProject1.UnitTest1.TestMethod1 threw exception: System.InvalidCastException: Unable to cast object of type ‘OpenQA.Selenium.Remote.RemoteWebElement’ to type ‘OpenQA.Selenium.Appium.Android.AndroidElement’.

Link to Appium logs

https://gist.github.com/Gocoollnath/c6b4be5ababf838a0acf0adb72552a20

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18

github_iconTop GitHub Comments

4reactions
Gocoollnathcommented, Jun 20, 2018

https://github.com/SeleniumHQ/selenium/issues/6045 . It’s confirmed that how RemoteWebDriver works have been changed based on request in latest Selenium driver versions. Can the update be also made to Appium? @jlipps @imurchie @TikhomirovSergey @mykola-mokhnach .Please, can you provide an update when this change be incorporated in Appium too?

1reaction
laolubensoncommented, Nov 8, 2018

@nikolay-advolodkin The latest and beta release supports up to Selenium v3.14. Your screenshot shows you have 3.14.1. Please raise a new issue using the issue template.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating to latest Selenium and Selenium support ...
Description Updating to latest Selenium(v3.12.0) and selenium support (v3.12.0) NuGetPackages raises Casting issue It was working fine till ...
Read more >
Unable to cast object of type 'OpenQA.Selenium.Chrome. ...
The above example works for me in .Net 6.0 with the following NuGet packages installed: Selenium.Support (4.1.1); Selenium.WebDriver (4.1.1) ...
Read more >
Upgrade to Selenium 4
Are you still using Selenium 3? This guide will help you upgrade to the latest release!
Read more >
long build after upgrade to version 16.8
I have updated VS2019 community from 16.7.something to 16.8.4 and build time is now like 3-4 times longer than before - extremely annoying....
Read more >
Chrome v111.x issue is fixed now in Latest Selenium Version
Finally Chrome v111.x issue is fixed now in Latest Selenium Version. Schedule a meeting in case of any queries/guidance/counselling: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found