Here is the Selenium RC code for selenium.SelectWindow in Webdriver. This code is in Visual Studio C#
public void SelectWindow(string Text)
{
driver.SwitchTo().Window(Text);
}
Here is the Selenium RC code for selenium.SelectFrame in Webdriver. This code is in Visual Studio C#
public void SelectFrame(string xpath)
{
driver.SwitchTo().Frame(xpath);
}
Here is the Selenium RC code for selenium.DeleteAllVisibleCookies in Webdriver. This code is in Visual Studio C#
public void DeleteAllVisibleCookies()
{
driver.Manage().Cookies.DeleteAllCookies();
}
Here is the Selenium RC code for selenium.waitForElementPresent in Webdriver. This code is in Visual Studio C#
public bool waitForElementPresent(string Xpath)
{
bool present = false;
for (int second = 0; ; second++)
{
if (second >= 5)
{
break;
}
if (IsElementPresent(Xpath))
{
present = true;
break;
}
Thread.Sleep(1000);
}
return present;
}
Here is the Selenium RC code for selenium.Refresh in Webdriver. This code is in Visual Studio C#
public void Refresh()
{
driver.Navigate().Refresh();
}
Here is the Selenium RC code for selenium.IsTextPresent in Webdriver. This code is in Visual Studio C#
public bool IsTextPresent(string text)
{
try
{
return driver.PageSource.Contains(text);
}
catch (Exception)
{
return false;
}
}