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


Python Log.logError方法代码示例

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


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

示例1: getLocationForElementXpath

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 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,代码行数:9,代码来源:AbstractPage.py

示例2: selectDropdownListItem

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 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,代码行数:9,代码来源:AbstractPage.py

示例3: getLocationForElementById

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 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,代码行数:9,代码来源:AbstractPage.py

示例4: getNameOfPicture

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 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,代码行数:9,代码来源:HomePageKlout.py

示例5: selectDropdownListItemXpath

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 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,代码行数:9,代码来源:AbstractPage.py

示例6: clickElementById

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 def clickElementById(self, id):
     if AbstractPage.flag:
         try:
             element = self.getElementByID(id)
             element.click()
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:9,代码来源:AbstractPage.py

示例7: clickElementByXPath

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 def clickElementByXPath(self, xpath):
     if AbstractPage.flag:
         try:
             element = self.getElementByXPath(xpath)
             element.click()
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:9,代码来源:AbstractPage.py

示例8: sendKeyByxPath

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 def sendKeyByxPath(self, xPath, value):
     if AbstractPage.flag:
         try:
             element = self.getElementByXPath(xPath)
             element.clear()
             element.send_keys(value)
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:10,代码来源:AbstractPage.py

示例9: sendKeyById

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 def sendKeyById(self, id, value):
     if AbstractPage.flag:
         try:
             element = self.getElementByID(id)
             element.clear()
             element.send_keys(value)
         except Exception, e:
             Log.logError(str(e))
开发者ID:lovingJune,项目名称:Selenium,代码行数:10,代码来源:AbstractPage.py

示例10: getTextById

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 def getTextById(self, id):
     if AbstractPage.flag:
         try:
             element = self.getElementByID(id)
             return element.text      
         except Exception, e:
             Log.logError(str(e))
             AbstractPage.flag = False
开发者ID:lovingJune,项目名称:Selenium,代码行数:10,代码来源:AbstractPage.py

示例11: getTextByXPath

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 def getTextByXPath(self, xpath):
     if AbstractPage.flag:
         try:
             element = self.getElementByXPath(xpath)
             return element.text      
         except Exception, e:
             Log.logError(str(e))
             AbstractPage.flag = False
开发者ID:lovingJune,项目名称:Selenium,代码行数:10,代码来源:AbstractPage.py

示例12: getAttributeById

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 def getAttributeById(self, id, attributeName):
     if AbstractPage.flag:
         try:
             element = self.getElementByID(id)
             return element.get_attribute(attributeName)
         except Exception, e:
             Log.logError(str(e))
             AbstractPage.flag = False
开发者ID:lovingJune,项目名称:Selenium,代码行数:10,代码来源:AbstractPage.py

示例13: closeBrowser

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 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,代码行数:10,代码来源:AbstractPage.py

示例14: mouseMoveToElementById

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 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,代码行数:10,代码来源:AbstractPage.py

示例15: getElementByXPath

# 需要导入模块: from reportlog.Log import Log [as 别名]
# 或者: from reportlog.Log.Log import logError [as 别名]
 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,代码行数:10,代码来源:AbstractPage.py


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