예제 #1
0
class Selenium_WebElement():
    def __init__(self):
        self.driver = BrowserConfig().driver

    def Element_id(self, revID):
        Element_id = self.driver.find_element_by_id(revID)
        return Element_id

    def Element_name(self, revName):
        Element_name = self.driver.find_element_by_name(revName)
        return Element_name

    def Element_class(self, revClass):
        Element_class = self.driver.find_element_by_class_name(revClass)
        return Element_class

    def Element_Xpath(self, revXpath):
        Element_Xpath = self.driver.find_element_by_xpath(revXpath)
        return Element_Xpath

    def Element_Text(self, revText):
        Element_Text = self.driver.find_element_by_link_text(revText)
        return Element_Text

    def ELement_xpath(self, revXpath):
        ELement_xpath = self.ELement_xpath(revXpath)
        return ELement_xpath
예제 #2
0
파일: haiyang.py 프로젝트: Lsm666777/python
 def setUp(self):
     BrowserConfig().BrowserGetUrl(self.URL)
예제 #3
0
파일: haiyang.py 프로젝트: Lsm666777/python
 def tearDownClass(cls):
     #真正结束清理代码段
     BrowserConfig().BrowserQuit()
예제 #4
0
파일: haiyang.py 프로젝트: Lsm666777/python
 def setUpClass(self):
     #真正实例化代码段
     self.URL = "http://192.168.0.23/tiny/"
     #类的实例化,调用输入URL方法,并传递域名
     BrowserConfig().BrowserGetUrl(self.URL)
예제 #5
0
 def __init__(self):
     self.driver = BrowserConfig().driver
예제 #6
0
 def tearDown(self):
     BrowserConfig().BrowserQuit()
예제 #7
0
 def setUp(self):
     BrowserConfig().BrowserGetUrl(self.URL)
     #self.Url = 'test-lsm.51zhongzi.com:7010/pos'
     #BrowserConfig().GetUrl(URl)
     BrowserConfig().BrowserMax()
예제 #8
0
 def setUpClass(self):
     #self.URL = 'http://localhost:7012/pos'
     self.URL = 'http:192.168.0.115:7090/cold'
     BrowserConfig().BrowserGetUrl(self.URL)