How to convert a found IWebElement
element to double
type?
Code example:
IWebElement SearchInput = Browser.FindElement(By.Id("betSize")); double G = Convert.ToDouble(SearchInput);
Here I was answered a question, thank you. But then I had a new question. How to convert the number taken from the tag argument.
for example
<input name="" value="0.00000000" autocomplete="off" id="betSize" type="text">
and if you try to convert it that way
double G = Convert.ToDouble(SearchInput.Text);
then get an error.
Decision
double number; double.TryParse(SearchInput.Text, out number);