Selenium Webdriver in C#.Net by Sagar Salunke

Selenium Webdriver in C#.Net by Sagar Salunke

Author:Sagar Salunke [Salunke, Sagar]
Language: eng
Format: azw3
Published: 2014-02-09T05:00:00+00:00


IWebElement e=null;

Thread.Sleep(5000);

//get the value selected in month drop down rediff page.

e = driver.FindElement(By.Name("DOB_Month"));

SelectElement se = new SelectElement(e);

Console.WriteLine(se.SelectedOption.Text);

Console.ReadLine();

}

catch(Exception e){

Console.WriteLine("Exception ....*********"+e.ToString());

}

finally{

Thread.Sleep(2000);

driver.Quit();

Console.ReadLine();

}

}

}

}

5.3.Reading data from checkboxes

We can see if the checkbox is selected or not using Selected as illustrated in the below example.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.