Ejemplo n.º 1
0
 public TestActionExecutor(SeleniumContext seleniumContext)
 {
     _beforeTestActions = new List <IBeforeTestAction>();
     _afterTestActions  = new List <IAfterTestAction> {
         new CloseDriverAction(seleniumContext.WebDriver)
     };
 }
Ejemplo n.º 2
0
 public GameTwist_End_To_End_Steps(Settings settings, SeleniumContext _seleniumContext, CommonRequest _commonRequest, SeleniumCommonPg _seleniumCommonPg)
 {
     _settings        = settings;
     seleniumContext  = _seleniumContext;
     commonRequest    = _commonRequest;
     seleniumCommonPg = _seleniumCommonPg;
 }
Ejemplo n.º 3
0
 public BasePage(string url, SeleniumContext seleniumContext, ConfigReader configReader)
 {
     this.url                       = url;
     Driver                         = seleniumContext.WebDriver;
     WaitForElementExists           = configReader.Config.Timeouts.WaitForElementExists;
     WaitForElementToBeInteractable = configReader.Config.Timeouts.WaitForElementToBeInteractable;
 }
 public HomePageService(HomePageObject pageObject, SeleniumContext seleniumContext,
                        TestConfiguration testConfiguration)
 {
     _pageObject        = pageObject;
     _webDriver         = seleniumContext.WebDriver;
     _testConfiguration = testConfiguration;
 }
Ejemplo n.º 5
0
 public PublicBrowseSteps(SeleniumContext context, Settings settings)
 {
     _context               = context;
     _publicBrowseBaseUrl   = settings.PublicBrowseBaseUrl;
     _publicBrowseLoginUrl  = settings.PublicBrowseLoginUrl;
     _publicBrowseLogoutUrl = settings.PublicBrowseLogoutUrl;
 }
Ejemplo n.º 6
0
 public EmailSteps(EmailServerDriver emailServerDriver, Settings settings, SeleniumContext seleniumContext, ScenarioContext context)
 {
     this.emailServerDriver = emailServerDriver ?? throw new ArgumentNullException(nameof(emailServerDriver));
     this.settings          = settings ?? throw new ArgumentNullException(nameof(settings));
     this.seleniumContext   = seleniumContext;
     this.context           = context;
 }
        public LoginSteps(SeleniumContext context, Settings settings)
        {
            this.context = context;

            sampleMvcBaseUrl = settings.SampleMvcClientBaseUrl;
            identityApiBaseUrl = settings.IdentityApiBaseUrl;
        }
Ejemplo n.º 8
0
 public DomElement(IWebElement element, RemoteWebDriver driver, SeleniumContext context, string searchedSelector = null)
 {
     _element          = element;
     _driver           = driver;
     _context          = context;
     _searchedSelector = searchedSelector;
 }
 public RegistrationSteps(
     IConfiguration configuration,
     ScenarioContext context,
     SeleniumContext seleniumContext)
 {
     _context         = context;
     _discovery       = configuration.GetValue <string>("DiscoveryAddress");
     _seleniumContext = seleniumContext;
 }
 public RegistrationSteps(
     IConfiguration configuration,
     ScenarioContext context,
     SeleniumContext seleniumContext)
 {
     this.context         = context;
     discovery            = configuration.GetValue <Uri>("DiscoveryAddress");
     this.seleniumContext = seleniumContext;
 }
Ejemplo n.º 11
0
 private IWebElement WaitUntilElementClickable(SeleniumContext seleniumContext, By elementLocator, int timeout = 10)
 {
     try
     {
         var wait = new WebDriverWait(seleniumContext.WebDriver, TimeSpan.FromSeconds(timeout));
         return(wait.Until(ExpectedConditions.ElementToBeClickable(elementLocator)));
     }
     catch (NoSuchElementException)
     {
         Console.WriteLine("Element with locator: '" + elementLocator + "' was not found in current context page.");
         throw;
     }
 }
        // GET: Selenium
        public ActionResult Selenium()
        {
            ViewBag.Messege = "Yahoo Finance";
            var        url          = "https://login.yahoo.com/";
            IWebDriver chromeDriver = new ChromeDriver();

            chromeDriver.Navigate().GoToUrl(url);
            var wait = new WebDriverWait(chromeDriver, TimeSpan.FromSeconds(15));

            wait.Until(cdrver => cdrver.FindElement(By.XPath("//input[@id='login-username']")));

            chromeDriver.FindElement(By.Id("login-username")).SendKeys("Ilovecheese5");
            chromeDriver.FindElement(By.Id("login-username")).Submit();

            using (var db = new SeleniumContext())
            {
                return(View(db));
            }
        }
 public UiInteractionSteps(SeleniumContext seleniumContext)
 {
     this.seleniumContext = seleniumContext;
 }
Ejemplo n.º 14
0
 public void RunBeforeScenario()
 {
     SeleniumContext = new SeleniumContext();
     _objectContainer?.RegisterInstanceAs(SeleniumContext);
 }
 public LoginPage(SeleniumContext seleniumContext, ConfigReader configReader)
     : base("https://onlineservices.ubs.com/", seleniumContext, configReader)
 {
 }
Ejemplo n.º 16
0
 public Workspace(SeleniumContext context)
 {
     _context = context;
     _context.Driver.Navigate().GoToUrl(Settings.Default.DefaultUrl + "/#/Workspace");
 }
Ejemplo n.º 17
0
 public UiStepsLogin(SeleniumContext seleniumContext)
 {
     ////save the context so you can use it in your tests
     this.seleniumContext = seleniumContext;
 }
Ejemplo n.º 18
0
 public Navigator(RemoteWebDriver driver, SeleniumContext seleniumContext)
 {
     _driver          = driver;
     _seleniumContext = seleniumContext;
 }
 public MainPage(SeleniumContext seleniumContext, ConfigReader configReader)
     : base("https://www.ubs.com/", seleniumContext, configReader)
 {
 }
Ejemplo n.º 20
0
 public RealizarUmaCompraSteps(SeleniumContext seleniumContext)
 {
     this.seleniumContext = seleniumContext;
     wait = new WebDriverWait(seleniumContext.WebDriver, TimeSpan.FromSeconds(10));
     realizarUmaCompraPageObject = new RealizarUmaCompraPageObject(seleniumContext.WebDriver);
 }
Ejemplo n.º 21
0
 public WorkItemTree(SeleniumContext context)
 {
     _context = context;
 }
 public LogoutSteps(SeleniumContext context, Settings settings)
 {
     _context            = context;
     _identityApiBaseUrl = settings.IdentityApiBaseUrl;
 }
Ejemplo n.º 23
0
 public HomePageObject(SeleniumContext seleniumContext)
 {
     PageFactory.InitElements(seleniumContext.WebDriver, this);
 }
 public SeleniumCommonPg(SeleniumContext _seleniumContext)
 {
     seleniumContext = _seleniumContext;
 }
Ejemplo n.º 25
0
 public CleanUpSteps(SeleniumContext seleniumContext)
 {
     this.SeleniumContext = seleniumContext;
 }
Ejemplo n.º 26
0
 public GoogleSearchSteps(SeleniumContext seleniumContext)
 {
     this.seleniumContext = seleniumContext;
 }
Ejemplo n.º 27
0
 public UiValidationSteps(SeleniumContext seleniumContext)
 {
     _seleniumContext = seleniumContext;
 }
Ejemplo n.º 28
0
 public Screenshots(SeleniumContext seleniumContext)
 {
     ////save the context so you can use it in your tests
     this.seleniumContext = seleniumContext;
 }
Ejemplo n.º 29
0
 public ErrorSteps(SeleniumContext seleniumContext)
 {
     this.seleniumContext = seleniumContext;
 }
Ejemplo n.º 30
0
 public static void BeforeTestRun()
 {
     seleniumContext = new SeleniumContext();
 }
Ejemplo n.º 31
0
 public DomWrapper(RemoteWebDriver driver, SeleniumContext context)
 {
     _driver  = driver;
     _context = context;
 }
Ejemplo n.º 32
0
 public StackCloneSteps(SeleniumContext seleniumContext)
 {
     this.seleniumContext = seleniumContext;
 }