Ejemplo n.º 1
0
 public DraftEmail(MyWebDriver driver) : base(driver)
 {
     //Объявляем переменные, которые могут понадобится
     this.addressee = TestDataProvider.Addressee;
     this.topic     = TestDataProvider.Topic;
     this.text      = TestDataProvider.Text;
 }
Ejemplo n.º 2
0
        public void CtxCreate()
        {
            Actions action = new Actions(MyWebDriver.GetDriver());

            action.MoveToElement(CreateCtx).Build().Perform();
            driver.JsHighlight(CreateCtx);
        }
Ejemplo n.º 3
0
 public EmailsContainer(MyWebDriver driver)
 {
     //Объявляем переменные, которые могут понадобится
     this.addressee = TestDataProvider.Addressee;
     this.topic     = TestDataProvider.Topic;
     this.driver    = driver;
 }
    public void main()
    {
        MyWebDriver <FirefoxDriver> driver = new MyWebDriver <FirefoxDriver>();

        driver.CurrentTest = "Entering to google website with Firefox Driver";
        driver.Navigate().GoToUrl("www.google.com");
    }
Ejemplo n.º 5
0
 public void MoveFileToFolder()
 {
     new Actions(MyWebDriver.GetDriver())
     .MoveToElement(ClearWaterFile)
     .DragAndDrop(ClearWaterFile, Folder)
     .Build()
     .Perform();
 }
Ejemplo n.º 6
0
 public void InputFolderNameAndAccept()
 {
     new Actions(MyWebDriver.GetDriver())
     .SendKeys(Keys.Backspace)
     .SendKeys(FolderNameInput, "TestFolder1")
     .Click(CreateFolderAcceptButton)
     .Build()
     .Perform();
 }
Ejemplo n.º 7
0
        public void Setup()
        {
            MyWebDriver driver = new MyWebDriver();

            driver.GetDriver();
            _driver          = driver;
            _testCaseHandler = new TestCaseHandler(_driver);
            report           = new BasicReport();
            report.StartReport();
            _screenShotGenerator = new ScreenshotGenerator(_driver);
        }
        public void Invoke(Action testStep, MyWebDriver driver, BasicReport report)
        {
            try
            {
                testStep();
            }
            catch (NoSuchElementException ex)
            {
                ATNoSuchElementException exception = new ATNoSuchElementException(string.Format("{0}:{1}", "Unable to identify element using selenium locator provided.", ex.Message), ex.InnerException);
                report.Fail(exception);
                throw exception;
            }
            catch (ElementNotVisibleException ex)
            {
                ATElementNotVisibleException exception = new ATElementNotVisibleException(string.Format("{0}:{1}", "Element not visible in the DOM. Check to see if element is hidden.", ex.Message), ex.InnerException);

                report.Fail(exception);
                throw exception;
            }
            catch (ElementNotSelectableException ex)
            {
                ATElementNotSelectableException exception = new ATElementNotSelectableException(string.Format("{0}:{1}", "Although element is present in the DOM, it may be disabled (cannot be clicked/selected).", ex.Message), ex.InnerException);

                report.Fail(exception);
                throw exception;
            }
            catch (InvalidElementStateException ex)
            {
                ATInvalidElementStateException exception = new ATInvalidElementStateException(string.Format("{0}:{1}", "You are performing an operation using this element that is no applicable.", ex.Message), ex.InnerException);

                report.Fail(exception);
                throw exception;
            }
            catch (TimeoutException ex)
            {
                ATTimeoutException exception = new ATTimeoutException(string.Format("{0}:{1}", "This comand did not complete in enough time.", ex.Message), ex.InnerException);

                report.Fail(exception);
                throw exception;
            }
            catch (WebDriverException ex)
            {
                throw new ATWebDriverException(string.Format("{0}:{1}", "The WebDriver is performing the action immediately after ‘closing’ the browser.", ex.Message), ex.InnerException);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                //_driver.Quit();
                //GC.Collect();
            }
        }
Ejemplo n.º 9
0
 public MailMainMenu(MyWebDriver driver) : base(driver)
 {
 }
Ejemplo n.º 10
0
 public SummaryPage(MyWebDriver driver) : base(driver)
 {
     _driver = driver;
 }
    public void main()
    {
        MyWebDriver <FirefoxDriver> driver = new MyWebDriver <FirefoxDriver>();

        driver.Navigate().GoToUrl("www.google.com");
    }
Ejemplo n.º 12
0
 public MainPage(MyWebDriver driver) : base(driver)
 {
     _driver = driver;
 }
Ejemplo n.º 13
0
 public BaseTest()
 {
     driver = MyWebDriver.Instance; //new MyWebDriver();
     driver.Navigate().GoToUrl("https://www.mail.ru");
 }
Ejemplo n.º 14
0
 public TestCaseHandler(MyWebDriver driver)
 {
     _driver = driver;
 }
Ejemplo n.º 15
0
 public Pages(MyWebDriver driver)
 {
     _driver = driver;
 }
Ejemplo n.º 16
0
 public Navigation(MyWebDriver driver)
 {
     _driver = driver;
 }
Ejemplo n.º 17
0
 public MailComposeNewEmail(MyWebDriver driver) : base(driver)
 {
 }
Ejemplo n.º 18
0
        public void ContextClick()
        {
            Actions action = new Actions(MyWebDriver.GetDriver());

            action.MoveToElement(Content).ContextClick().Perform();
        }
Ejemplo n.º 19
0
 public BasePage(MyWebDriver driver)
 {
     this.driver = driver;
 }
Ejemplo n.º 20
0
 public void Invoke <T>(Action testCase, MyWebDriver driver, BasicReport report)
 {
     Invoke(testCase, driver, report);
 }
 public ScreenshotGenerator(MyWebDriver driver)
 {
     _driver = driver.Driver;
 }
Ejemplo n.º 22
0
 public MailHomePage(MyWebDriver driver) : base(driver)
 {
 }
Ejemplo n.º 23
0
 public FilesContainer(MyWebDriver driver)
 {
     this.driver = driver;
     //this.driver = driver;
 }
Ejemplo n.º 24
0
 public CloudMainMenu(MyWebDriver driver) : base(driver)
 {
 }
Ejemplo n.º 25
0
 public FolderMenu(MyWebDriver driver)
 {
     this.driver = driver;
 }
Ejemplo n.º 26
0
 public void StartBrowser()
 {
     Chrome = new MyWebDriver(new ChromeDriver());
     Chrome.Manage().Window.Maximize();
     Chrome.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
 }
Ejemplo n.º 27
0
 public AppointmentPage(MyWebDriver driver) : base(driver)
 {
     _driver = driver;
 }