#在元素定位二次封装的基础上,封装判断元素是否可见,找到元素时返回True,找不到元素的时候抛出异常,返回False
def isElementPresent(self,locate_type,value):
try:
self.findElement(locate_type,value)
return True
except NoSuchElementException as e:
# print(e)
return False
转载于:https://www.cnblogs.com/hfct/p/10984378.html