当前位置: 首页>>代码示例>>Python>>正文


Python Log.Log类代码示例

本文整理汇总了Python中reportlog.Log.Log的典型用法代码示例。如果您正苦于以下问题:Python Log类的具体用法?Python Log怎么用?Python Log使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Log类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: selectDropdownListItemXpath

 def selectDropdownListItemXpath(self, xpath, xpathItem):
     if AbstractPage.flag:
         try:
             self.getSettingPage.getElementByXPath(xpath).click()
             self.getSettingPage.getElementByXPath(xpathItem).click()
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:7,代码来源:AbstractPage.py

示例2: clickElementById

 def clickElementById(self, id):
     if AbstractPage.flag:
         try:
             element = self.getElementByID(id)
             element.click()
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:7,代码来源:AbstractPage.py

示例3: selectDropdownListItem

 def selectDropdownListItem(self, id, value):        
     if AbstractPage.flag:
         try:                
             select = Select(self.getElementByID(id))               
             select.select_by_visible_text(value)                           
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:7,代码来源:AbstractPage.py

示例4: clickElementByXPath

 def clickElementByXPath(self, xpath):
     if AbstractPage.flag:
         try:
             element = self.getElementByXPath(xpath)
             element.click()
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:7,代码来源:AbstractPage.py

示例5: getLocationForElementXpath

 def getLocationForElementXpath(self, xPath):
     if AbstractPage.flag:
         try:
             element = self.getElementByXPath(xPath)
             return element.location['x'], element.location['y']
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:7,代码来源:AbstractPage.py

示例6: getNameOfPicture

 def getNameOfPicture(self):
     if AbstractPage.flag:
         try:                                                                                
             return self.getAttributeByXPath(self.img_myProfile_xpath, "title")
             
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:7,代码来源:HomePageKlout.py

示例7: getLocationForElementById

 def getLocationForElementById(self, id):
     if AbstractPage.flag:
         try:
             element = self.getElementByID(id)
             return element.location['x'], element.location['y']
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:7,代码来源:AbstractPage.py

示例8: isScoreExisted

 def isScoreExisted(self):   
     if AbstractPage.flag:                                                                              
         if self.checkControlExistedByXpath(self.img_score_xpath):
             Log.logInfo("Score picture is existed")
             return True
         else:
             Log.logInfo("Score picture is not existed")
             return False
开发者ID:lovingJune,项目名称:Selenium,代码行数:8,代码来源:HomePageKlout.py

示例9: isSeemoreLinkExist

 def isSeemoreLinkExist(self):
     if AbstractPage.flag:
         if self.checkControlExistedByXpath(self.link_seeMoreTopic_xpath):
             Log.logInfo("See more link is existed!")
             return True
         else:
             Log.logInfo("See more link is not existed!")
             return False
开发者ID:lovingJune,项目名称:Selenium,代码行数:8,代码来源:ProfilePageKlout.py

示例10: isPopupDisplayed

 def isPopupDisplayed(self):
     if AbstractPage.flag:
         if self.checkControlExistedByXpath(self.img_closePopup_xpath):
             Log.logInfo("Popup displayed!")
             return True
         else:
             Log.logInfo("Popup is not displayed!")
             return False
开发者ID:lovingJune,项目名称:Selenium,代码行数:8,代码来源:ProfilePageKlout.py

示例11: isScoreExisted_profilePage

 def isScoreExisted_profilePage(self):   
     if AbstractPage.flag:                                                          
         if self.checkControlExistedByXpath(self.img_score_xpath):
             Log.logInfo("Control Score is existed!")
             return True
         else:
             Log.logInfo("Control Score is not existed!")
             return False
开发者ID:lovingJune,项目名称:Selenium,代码行数:8,代码来源:ProfilePageKlout.py

示例12: mouseMoveToElementById

 def mouseMoveToElementById(self, elementID):
     if AbstractPage.flag:
         try:
             element = self.getElementByID(elementID)
             hov = ActionChains(AbstractPage.Browser()).move_to_element(element)
             hov.perform()
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:8,代码来源:AbstractPage.py

示例13: isLogoutPageSuccessfully

 def isLogoutPageSuccessfully(self):
     if AbstractPage.flag:
         if self.checkControlExistedByXpath(self.btn_twitter_xpath):
             Log.logInfo("Logout facebook completely")
             return True
         else:
             Log.logInfo("Logout facebook imcompletely")
             return False
开发者ID:lovingJune,项目名称:Selenium,代码行数:8,代码来源:LoginPageKlout.py

示例14: getElementByXPath

 def getElementByXPath(self, xPath, timeout = 30):
     if AbstractPage.flag:
         try:
             WebDriverWait(AbstractPage.Browser, timeout).until(lambda driver: AbstractPage.Browser().find_element_by_xpath(xPath))
             return AbstractPage.Browser().find_element_by_xpath(xPath)
         except Exception, e:
             Log.logError(str(e))
             AbstractPage.flag = False
开发者ID:lovingJune,项目名称:Selenium,代码行数:8,代码来源:AbstractPage.py

示例15: closeBrowser

 def closeBrowser():
     try:
         AbstractPage.Browser().quit()
         AbstractPage.browser = None
         AbstractPage.flag = True
         Log.logInfo("Close browser")
     except Exception, e:
         Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:8,代码来源:AbstractPage.py


注:本文中的reportlog.Log.Log类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。