using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ToolsQA
{
class FirstTestCase
{
static void Main(string[] args)
{
IWebDriver driver = new FirefoxDriver();
driver.Navigate().GoToUrl(" http://toolsqa.wpengine.com/automation-practice-form/");
IWebElement element = driver.FindElement(By.Id("continents"));
SelectElement dropdown = new SelectElement(element);
dropdown.SelectByText("Europe");
}
}
}
This is mistake:
Severity Code Description Project File Line Suppression State Error CS1061 'SelectElement' does not contain a definition for 'SelectByText' and no extension method 'SelectByText' accepting a first argument of type 'SelectElement' could be found (are you missing a using directive or an assembly reference?) ToolsQA
How does solve it?