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

            action.MoveToElement(CreateCtx).Build().Perform();
            driver.JsHighlight(CreateCtx);
        }
Exemple #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");
    }
Exemple #5
0
 public void MoveFileToFolder()
 {
     new Actions(MyWebDriver.GetDriver())
     .MoveToElement(ClearWaterFile)
     .DragAndDrop(ClearWaterFile, Folder)
     .Build()
     .Perform();
 }
Exemple #6
0
 public void InputFolderNameAndAccept()
 {
     new Actions(MyWebDriver.GetDriver())
     .SendKeys(Keys.Backspace)
     .SendKeys(FolderNameInput, "TestFolder1")
     .Click(CreateFolderAcceptButton)
     .Build()
     .Perform();
 }
Exemple #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();
            }
        }
Exemple #9
0
 public MailMainMenu(MyWebDriver driver) : base(driver)
 {
 }
Exemple #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");
    }
Exemple #12
0
 public MainPage(MyWebDriver driver) : base(driver)
 {
     _driver = driver;
 }
Exemple #13
0
 public BaseTest()
 {
     driver = MyWebDriver.Instance; //new MyWebDriver();
     driver.Navigate().GoToUrl("https://www.mail.ru");
 }
 public TestCaseHandler(MyWebDriver driver)
 {
     _driver = driver;
 }
Exemple #15
0
 public Pages(MyWebDriver driver)
 {
     _driver = driver;
 }
Exemple #16
0
 public Navigation(MyWebDriver driver)
 {
     _driver = driver;
 }
Exemple #17
0
 public MailComposeNewEmail(MyWebDriver driver) : base(driver)
 {
 }
Exemple #18
0
        public void ContextClick()
        {
            Actions action = new Actions(MyWebDriver.GetDriver());

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