Exemplo n.º 1
0
def startdriver():
    global driver
    if (Config.readconfig("Details", "Browser") == "Chrome"):
        caps = DesiredCapabilities().CHROME
        caps['pageLoadStrategy'] = 'eager'
        path = "./Drivers/chromedriver.exe"
        driver = Chrome(executable_path=path)
        return driver

    elif (Config.readconfig("Details", "Browser") == "Firefox"):
        path = "./Drivers/geckodriver.exe"
        driver = Firefox(executable_path=path)
        return driver
Exemplo n.º 2
0
def start():
    global driver
    driver = Initiate.startdriver()
    driver.get(Config.readconfig('Details', 'URL'))
    driver.maximize_window()
    yield
    driver = Initiate.closedriver()
Exemplo n.º 3
0
def test_dataset(data):
    driver = Initiate.startdriver()
    driver.get(Config.readconfig("Details", "URL"))
    driver.maximize_window()
    reg = Registration.register(driver)
    reg.Login("Login")
    time.sleep(5)
    reg.Username2(data[0])
    reg.Passward2(data[1])
    reg.Login2("Login2")
Exemplo n.º 4
0
 def City(self,City):
     obj = Select(driver.find_element_by_xpath(Config.elementLoc("RegElements", "City")))
     obj.select_by_visible_text("Ranibennur")
Exemplo n.º 5
0
 def Login2(self,Login2):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "Login2")).click()
Exemplo n.º 6
0
 def Passward2(self,Passward2):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "Passward2")).send_keys(Passward2)
Exemplo n.º 7
0
 def Username2(self,Username2):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "Username2")).send_keys(Username2)
Exemplo n.º 8
0
 def GetURL(self, URL):
     driver.get(Config.readconfig("Details", "URL"))
     driver.maximize_window()
Exemplo n.º 9
0
 def SignUp(self,SignUp):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "SignUp")).click()
Exemplo n.º 10
0
 def Terms(self,Terms):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "Terms")).click()
Exemplo n.º 11
0
 def Cpassward(self, Cpassward):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "Cpassward")).send_keys(Cpassward)
Exemplo n.º 12
0
 def Country(self,Country):
     obj = Select(driver.find_element_by_xpath(Config.elementLoc("RegElements", "Country")))
     obj.select_by_visible_text("India")
Exemplo n.º 13
0
 def State(self,State):
     obj = Select(driver.find_element_by_xpath(Config.elementLoc("RegElements", "State")))
     obj.select_by_visible_text("Karnataka")
Exemplo n.º 14
0
 def Sex(self,Sex):
     obj = Select(driver.find_element_by_xpath(Config.elementLoc("RegElements", "Sex")))
     obj.select_by_index(1)
Exemplo n.º 15
0
 def Scroll(self,Scroll):
     driver.execute_script(Config.elementLoc("RegElements", "Scroll"))
Exemplo n.º 16
0
 def Home(self, Home):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "Home")).click()
Exemplo n.º 17
0
 def Phone(self, Phone):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "Phone")).send_keys(Phone)
Exemplo n.º 18
0
 def DOB(self, DOB):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "DOB")).send_keys(DOB)
Exemplo n.º 19
0
 def Zip(self,Zip):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "Zip")).send_keys("581115")
Exemplo n.º 20
0
 def EmailID(self, EmailID):
     driver.find_element_by_xpath(Config.elementLoc("RegElements", "EmailID")).send_keys(EmailID)