DOTNET v48 Missing methods

196 views
Skip to first unread message

Michael Ommundson

unread,
Oct 18, 2021, 2:12:44 AM10/18/21
to Selenium Users
Hi All,

Is the below a legit issue that should be raised on github or am i missing something?

I'm just trying to make sense of what i'm seeing. I'm getting familiar with Selenium and am following this
I kept reaching a dead end while trying to use 
  • $ChromeDriver.FindElementByXPath('//*[@id="username_or_email-731"]').SendKeys('YOUR USERNAME HERE')
Its only by noticing the version that was being used on a youtube video did i see that it was working on this version

I have tested the below versions
  • selenium-dotnet-4.0.0.zip
  • selenium-dotnet-4.0.0-rc3.zip
  • selenium-dotnet-4.0.0-rc2.zip
  • selenium-dotnet-4.0.0-rc1.zip
  • selenium-dotnet-4.0.0-beta-4.zip
Files tested
  • selenium-dotnet-4.0.0.zip/Selenium.WebDriver.4.0.0-beta2.nupkg\Selenium.WebDriver.4.0.0\lib\net48\WebDriver.dll

All methods that arent available after Selenium 4 Beta 2
  • FindElementByClassName
  • FindElementByCssSelector
  • FindElementById
  • FindElementByLinkText
  • FindElementByName
  • FindElementByPartialLinkText
  • FindElementByTagName
  • FindElementByXPath
  • FindElements
  • FindElements
  • FindElementsByClassName
  • FindElementsByCssSelector
  • FindElementsById
  • FindElementsByLinkText
  • FindElementsByName
  • FindElementsByPartialLinkText
  • FindElementsByTagName
  • FindElementsByXPath

Jim Evans

unread,
Oct 18, 2021, 6:24:58 PM10/18/21
to Selenium Users
The `IFindsBy*` interfaces (`IFindsByXPath`, `IFindsByCssSelector`, etc.) had been marked deprecated for some time, meaning that the methods defined by those interfaces (`FindElementByXPath`, `FindElementByCssSelector`, etc.) had also been marked as deprecated. A refactor of the class hierarchy during the 4.0 beta time frame meant that the deprecation had finally come to pass, and these methods were no longer available on driver classes. The examples you're following are outdated; you should be using the `FindElement` or `FindElements` methods, which take a `By` object as their argument. Contrary to your assertion in your post here, those methods most assuredly _are_ available; I've validated that by looking at the assembly using ILDASM, just in case something in the build process for the release had gone horribly wrong.

Michael Ommundson

unread,
Oct 27, 2021, 6:23:05 AM10/27/21
to Selenium Users
Thanks for confirming that this is expected due to those methods being deprecated. I had not been able to get the FindElement method working/i couldnt figure out the syntax which is why i went digging to find something that would work using the examples i could find. You are 100% correct about the FindElement and FindElements method, this was just bad proof reading on my part.
Reply all
Reply to author
Forward
0 new messages