chevron_left chevron_right
Login Register invert_colors photo_library


Stay updated and chat with others! - Join the Discord!
Thread Rating:
  • 0 Vote(s) - 0 Average


Convert Selenium Object to String? filter_list
Author
Message
Convert Selenium Object to String? #1
Basically I have a variable element , which is a selenium element. More specifically an element_id from the spotify page.

I want to compare this to another variable / string , in an if statement. But obviously I get the error (cannot convert type selenium object to string). Any work around? None of the solutions found on stackexchange worked for me. Let me know if you need more detail , I'm using C# and selenium.

Many thanks.
Discord : Whiteey#2922


Reply

RE: Convert Selenium Object to String? #2
(07-02-2019, 07:18 PM)Biglad465 Wrote: Basically I have a variable element , which is a selenium element. More specifically an element_id from the spotify page.

I want to compare this to another variable / string , in an if statement. But obviously I get the error (cannot convert type selenium object to string). Any work around? None of the solutions found on stackexchange worked for me. Let me know if you need more detail , I'm using C# and selenium.

Many thanks.

First of all, this is in the wrong section. It should be in https://sinister.ly/Forum-Visual-Basic-NET-Framework

Next up, we're going to need to see some code. You can't directly compare those two together because apparently your object doesn't enherit IEquatable<string>. You'll need to perform some transformation, cast, or extraction in order to be able to do that.

Reply






Users browsing this thread: 1 Guest(s)