Ejemplo n.º 1
0
 def __init__(self, driver):
     WebGeneric.__init__(self, driver)
     self.driver = driver
     self.signin_nav = "//a[text()='Sign In']"
     self.un_id = "email"
     self.pwd_id = "password"
     self.Sign_in = "btnSignin"
Ejemplo n.º 2
0
 def __init__(self, driver):
     WebGeneric.__init__(self, driver)
     self.un_xpath = "//input[@class='_2zrpKA _1dBPDZ']"
     self.pwd_xpath = "//input[@type='password']"
     self.login_xpath = "//*[@class='_2AkmmA _1LctnI _7UHT_c']"
     self.close_xpath = "//*[@class='_2AkmmA _29YdH8']"
     self.wg = WebGeneric(self.driver)
Ejemplo n.º 3
0
 def __init__(self, driver):
     WebGeneric.__init__(self, driver)
     # self.driver=driver
     self.un_id = "j_username"
     self.pwd_name = "j_password"
     self.login_btn_xpath = "Submit"
     self.wg = WebGeneric(self.driver)
Ejemplo n.º 4
0
 def __init__(self, driver):
     WebGeneric.__init__(self, driver)
     #self.driver=driver
     self.un_id = "username"
     self.pwd_name = "pwd"
     self.login_btn_xpath = "//*[text()='Login ']"
     self.wg = WebGeneric(self.driver)
Ejemplo n.º 5
0
    def __init__(self, driver):

        WebGeneric.__init__(self, driver)
        self.driver = driver
        self.un_id = 'j_username'
        self.pwd_name = 'j_password'
        self.login = "******"
Ejemplo n.º 6
0
 def __init__(
     self, driver
 ):  # Created a constructor>>to take driver ref from test file  #### 7 ####
     self.driver = driver
     WebGeneric.__init__(
         self, driver
     )  # Declared Webgeneric constructor inside driver   #### 12 ####
     self.logout_xpath = "//a[text()='Log Out']"  # Declared locator values                   #### 13 ####
Ejemplo n.º 7
0
class FB_LoginPage(WebGeneric):
    def __init__(self, driver):
        WebGeneric.__init__(self, driver)
        self.un_id = "email"
        self.pwd_id = "pass"
        self.wg = WebGeneric(driver)

    def acti_login(self):
        self.wg.enter("id", self.un_id, USERNAME)
        self.wg.enter("id", self.pwd_id, PASSWORD)
Ejemplo n.º 8
0
class LoginPage1(WebGeneric):
    def __init__(self, driver):
        WebGeneric.__init__(self, driver)
        self.un_id = "username"
        self.pss_name = "pwd"
        self.wg = WebGeneric(self.driver)

    def enter_un(self):
        self.wg.enter("id", self.un_id, USERNAME)

    def enter_pwd(self):
        self.wg.enter("name", self.pss_name, PASSWORD)
class FBDashBoardPage(WebGeneric):
    def __init__(self, driver):
        WebGeneric.__init__(self, driver)
        self.search_xpath = "//input[@title='Search for products, brands and more']"
        self.wg = WebGeneric(self.driver)

    def fb_search(self, item_name):
        self.wg.enter("xpath", self.search_xpath, item_name)
        time.sleep(5)

    def fb_click_on_search(self):
        ele = self.wg.locator("xpath", self.search_xpath)
        ele.send_keys(Keys.ENTER)
        time.sleep(5)
Ejemplo n.º 10
0
    def logout_cms(
        self
    ):  # Need to change driver-->self.driver                       #### 8 ####

        act = ActionChains(self.driver)
        act.move_to_element(
            self.driver.find_element_by_xpath(
                "//img[@class='avatar avatar-26 photo']"))
        act.perform()
        self.driver.implicitly_wait(30)

        # self.driver.find_element_by_xpath("//a[text()='Log Out']").click()
        w = WebGeneric(self.driver)  #### 14/15 ####
        w.submit1("xpath", self.logout_xpath)
Ejemplo n.º 11
0
class Login(WebGeneric):
    def __init__(self, driver):
        WebGeneric.__init__(self, driver)
        self.driver = driver
        self.signin_nav = "//a[text()='Sign In']"
        self.un_id = "email"
        self.pwd_id = "password"
        self.Sign_in = "btnSignin"
        self.wg = WebGeneric(self.driver)

    def zoomin_login(self):
        self.wg.signin("xpath", self.signin_nav)
        self.wg.enter("id", self.un_id, USERNAME)
        self.enter("id", self.pwd_id, PASSWORD)
        self.submit("id", self.Sign_in)
Ejemplo n.º 12
0
class JenkinsLoginPage(WebGeneric):
    def __init__(self, driver):
        WebGeneric.__init__(self, driver)
        # self.driver=driver
        self.un_id = "j_username"
        self.pwd_name = "j_password"
        self.login_btn_xpath = "Submit"
        self.wg = WebGeneric(self.driver)

    def jenkins_login(self):
        un = self.wg.get_val("Login", "UserName")
        self.wg.enter("id", self.un_id, un)
        self.wg.enter("name", self.pwd_name,
                      self.wg.get_val("Login", "Password"))
        self.wg.submit("xpath", self.login_btn_xpath)
        self.wg.get_screenshot()
class WindowHandlingPage(WebGeneric):
    def __init__(self,driver):
        WebGeneric.__init__(self,driver)
        self.login_xpath="//span[text()='Login']"
        self.email_tx_id="inputEmail"
        # self.dest_xpath="//*[@id='droppable']"
        self.wg=WebGeneric(self.driver)

    def window_handle(self):
        cur_win_id = self.driver.current_window_handle
        time.sleep(15)
        #self.locator("xpath",self.login_xpath)
        self.wg.submit("xpath",self.login_xpath)
        mul_win_id = self.driver.window_handles
        for id in mul_win_id:
            if (cur_win_id != id):
                self.driver.switch_to.window(id)
                time.sleep(3)
                self.wg.enter("id",self.email_tx_id,"Test")
Ejemplo n.º 14
0
class GooglePage(WebGeneric):
    def __init__(self, driver):
        WebGeneric.__init__(self, driver)
        self.un_xpath = "//input[@name='q']"
        self.wg = WebGeneric(self.driver)

    def fb_login(self, un, pwd):
        self.wg.enter("xpath", self.un_xpath, un)
        self.wg.enter("xpath", self.pwd_xpath, pwd)
        self.wg.submit("xpath", self.login_xpath)

    def fb_close(self):
        self.wg.submit("xpath", self.close_xpath)
Ejemplo n.º 15
0
class LoginPage(WebGeneric):
    def __init__(self, driver):
        WebGeneric.__init__(self, driver)
        #self.driver=driver
        self.un_id = "username"
        self.pwd_name = "pwd"
        self.login_btn_xpath = "//*[text()='Login ']"
        self.wg = WebGeneric(self.driver)

    def acti_login(self):
        # Logint to application - section 2 >>S2
        #self.driver.find_element_by_id("username").send_keys("admin")
        un = self.wg.get_val("Login", "UserName")
        #self.wg.enter("id",self.un_id,USERNAME)
        self.wg.enter("id", self.un_id, un)
        #self.driver.find_element_by_name("pwd").send_keys("manager")

        self.wg.enter("name", self.pwd_name,
                      self.wg.get_val("Login", "Password"))
        #self.wg.enter("name",self.pwd_name,PASSWORD)
        #self.driver.find_element_by_xpath("//*[text()='Login ']").click()
        self.wg.submit("xpath", self.login_btn_xpath)
        self.wg.get_screenshot()
Ejemplo n.º 16
0
class FBLoginPage(WebGeneric):
    def __init__(self, driver):
        WebGeneric.__init__(self, driver)
        self.un_xpath = "//input[@class='_2zrpKA _1dBPDZ']"
        self.pwd_xpath = "//input[@type='password']"
        self.login_xpath = "//*[@class='_2AkmmA _1LctnI _7UHT_c']"
        self.close_xpath = "//*[@class='_2AkmmA _29YdH8']"
        self.wg = WebGeneric(self.driver)

    def fb_login(self, un, pwd):
        self.wg.enter("xpath", self.un_xpath, un)
        self.wg.enter("xpath", self.pwd_xpath, pwd)
        self.wg.submit("xpath", self.login_xpath)

    def fb_close(self):
        self.wg.submit("xpath", self.close_xpath)
Ejemplo n.º 17
0
    def login_cms(self,UN,PWD):  # Need to change driver-->self.driver                       #### 8 ####

        # self.driver.find_element_by_id("user_login").send_keys(UN)
        # self.driver.find_element_by_id("user_pass").send_keys(PWD)
        # self.driver.find_element_by_id("wp-submit").click()

        w=WebGeneric(self.driver)                                                            #### 14 ####
        w.enter("id",self.un_id,UN)
        w.enter("id",self.pwd_id,PWD)
        w.submit("id",self.sb_id)                            #  "id"                         #### 16 ####







# Control ->Webgeneric.py                                                                    ##### 9 ####

# Control-->LocatorGeneric.py                                                                #### 15 ####
Ejemplo n.º 18
0
 def __init__(self, driver):
     WebGeneric.__init__(self, driver)
     self.un_xpath = "//input[@name='q']"
     self.wg = WebGeneric(self.driver)
 def __init__(self, driver):
     WebGeneric.__init__(self, driver)
     self.search_xpath = "//input[@title='Search for products, brands and more']"
     self.wg = WebGeneric(self.driver)
Ejemplo n.º 20
0
 def __init__(self, driver):
     WebGeneric.__init__(self, driver)
     self.un_id = "username"
     self.pss_name = "pwd"
     self.wg = WebGeneric(self.driver)
 def __init__(self,driver):
     WebGeneric.__init__(self,driver)
     self.login_xpath="//span[text()='Login']"
     self.email_tx_id="inputEmail"
     # self.dest_xpath="//*[@id='droppable']"
     self.wg=WebGeneric(self.driver)
Ejemplo n.º 22
0
 def __init__(self, driver):
     WebGeneric.__init__(self, driver)
     self.un_id = "email"
     self.pwd_id = "pass"
     self.wg = WebGeneric(driver)
Ejemplo n.º 23
0
    def jenkinslogin(self, un, pwd):

        wg = WebGeneric(self.driver)
        wg.enter(self.un_id, un)
        wg.enter(self.pwd_name, pwd)
        wg.submit(self.login)
Ejemplo n.º 24
0
 def __init__(self,driver):   # Created a constructor>>to take driver ref from test file  #### 7 ####
     self.driver=driver
     WebGeneric.__init__(self,driver)     # Declared Webgeneric constructor inside driver  #### 12 ####
     self.un_id="user_login"              # Declared locator values                        #### 13 ####
     self.pwd_id="user_pass"
     self.sb_id="wp-submit"
Ejemplo n.º 25
0
 def __init__(self, driver):
     WebGeneric.__init__(self, driver)
     self.iframe_xpath = "//iframe[@class='demo-frame']"
     self.src_xpath = "//*[@id='draggable']"
     self.dest_xpath = "//*[@id='droppable']"
     self.wg = WebGeneric(self.driver)
Ejemplo n.º 26
0
 def zoomin_login(self, un, pwd):
     wg = WebGeneric(self.driver)
     wg.signin(self.signin_nav)
     wg.enter(self.un_id, un)
     wg.enter(self.pwd_id, pwd)
     wg.submit(self.Sign_in)