Exemplo n.º 1
0
        public void WhenUserClicksOnSevenDaysFreeSubscribeNowButton()
        {
            //Read the elemnet locator from JSON File
            var Trial = _parser.GetElementByName("Trial");

            SEActions.ClickLink(Trial);
        }
Exemplo n.º 2
0
        public void WhenDragAnndDropTo(string _source, string _target)
        {
            var source = _parser.GetElementByName(_source);
            var target = _parser.GetElementByName(_target);

            SEActions.DragAndDrop(source, target);
        }
Exemplo n.º 3
0
        public void ThenUserClicksOnSubscribeLinkInExistingUserSection()
        {
            //Read the elemnet locator from JSON File
            var link = _parser.GetElementByName("Subscribe");

            SEActions.ClickLink(link);
        }
Exemplo n.º 4
0
        public void ThenUserClicksOnTermsAndConditionsLinkInCreateYourAccountSection()
        {
            //read the elemnt locatores from JSOn file
            var link = _parser.GetElementByName("TermsConditions");

            SEActions.ClickLink(link);
        }
Exemplo n.º 5
0
        public void ThenUserClicksOnClickHereLinkInCreateYourAccountSection()
        {
            //Read the elemnet locator from JSON File
            var link = _parser.GetElementByName("ClickHere");

            SEActions.ClickLink(link);
        }
Exemplo n.º 6
0
        public void ThenUserShouldSelectsLebanonFromCountryDropdownMenu(string selection)
        {
            //Get the element locator
            var dropwdown = _parser.GetElementByName("Countries");

            SEActions.SelectFromDropDown(dropwdown, selection);
        }
Exemplo n.º 7
0
        public void ThenUserClicksOnContinueButton()
        {
            //Read the elemnet locator from JSON File
            var btn = _parser.GetElementByName("ContinueButton");

            SEActions.ClickButton(btn);
        }
Exemplo n.º 8
0
        public void ThenUserEntersPasswordAs(string password)
        {
            //read the elemnt locatores from JSOn file
            var txtbox = _parser.GetElementByName("PasswordTextbox");

            SEActions.TypeText(txtbox, password);
        }
Exemplo n.º 9
0
        public void ThenUserEntersUsernameAs(string name)
        {
            //Read the elemnet locator from JSON File
            var txtbox = _parser.GetElementByName("EmailTextbox");

            SEActions.TypeText(txtbox, name);
        }
Exemplo n.º 10
0
 public void WhenClickOnLink(string link)
 {
     try
     {
         var _link = _parser.GetElementByName(link);
         SEActions.ClickLink(_link);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
 }
        public void ThenUserShouldSelectsLebanonFromCountryDropdownMenu(string selection)
        {
            //Get the element locator
            var dropwdown = _parser.GetElementByName("Countries");

            //Put the countries in Dictionary
            Dictionary <string, string> countries = new Dictionary <string, string>()
            {
                { "Lebanon", "لبنان" },
                { "Bahrain", "البحرين" }
            };

            SEActions.SelectFromDropDown(dropwdown, countries[selection]);
        }
        public void WhenUserChangesLanguageInWelcomeScreen()
        {
            //Read the elemnet locator from JSON File
            var changeLanguage = _parser.GetElementByName("ChangeLanguage");

            //Scroll to Element
            Driver.WebDriver.ScrollToElement(changeLanguage, 10);
            //Inspec the element
            IWebElement button = Driver.WebDriver.InspectElement(changeLanguage);
            //Read the element text
            string btn = button.Text;

            if (btn == "العربية")
            {
                SEActions.ClickButton(changeLanguage);
            }
        }
Exemplo n.º 13
0
        public void WhenSelectCheckbox(string _checkbox)
        {
            var checkbox = _parser.GetElementByName(_checkbox);

            SEActions.SelectCheckBox(checkbox);
        }
Exemplo n.º 14
0
        public void WhenClickOnButton(string _button)
        {
            var _uploadButton = _parser.GetElementByName(_button);

            SEActions.ClickButton(_uploadButton);
        }
Exemplo n.º 15
0
        public void WhenChooseFileToUpload(string _file)
        {
            var _uploadButton = _parser.GetElementByName("Choose file");

            SEActions.UploadFile(_uploadButton, _file);
        }