自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 TypeError: 'WebElement' object is not iterable

使用元素定位获取元素列表循环时报错原因:需要使用定位到多个元素,错误的使用了element方法,find_element()会返回一个WebElement节点对象,而不是多个元素对象。当你想要把获取的多个元素进行操作时会出现以上错误,此时使用会返回一个元素列表,就不会出现此错误...

2019-12-17 11:26:45 1129

原创 python os.path模块

os.pathimport ospath1= os.path.realpath(__file__)#返回绝对路径path2= os.path.abspath(__file__)#返回真实路径path3= os.path.split(os.path.abspath(__file__)) # 返回一个元祖,为路径与文件名称path4= os.path.split(os.path.absp...

2019-11-28 16:12:59 161

原创 python 调用主类及子类相同方法名

class car: "一辆车的信息,为主类" def __init__(self,car_type,car_colour,car_price): self.car_type =car_type self.car_colour =car_colour self.car_price =car_price def print_c...

2019-09-24 11:00:43 652

原创 TypeError: descriptor '__init__' requires a 'super' object but received a 'str'错误

TypeError: descriptor ‘init’ requires a ‘super’ object but received a ‘str’class car: "一辆车的信息,为主类" def __init__(self,car_type,car_colour,car_price): self.car_type =car_type se...

2019-09-12 11:34:07 1670

原创 Python--修改列表中所有的元素

此段代码循环了列表中的值 但是不会修改列表// An highlighted blockdef make_great(magicians): for magician in magicians: #每次循环拿到列表的的值进行赋值给magician magician = "the Great " + magician #打印出magician的的值...

2019-08-27 18:00:44 7193 5

原创 Python --While循环

Python-Whilewhile循环实例1// An highlighted blocksign =Truequestionnaire ={}while sign: name =input('您的名称是:') place =input('您喜欢的地方是:') questionnaire[name] = place #创建键值对 select =input...

2019-08-26 11:47:28 386 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除