style1 = 'position: absolute; display: block; border-style: solid; white-space: nowrap; z-index: 9999999; transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s; background-color: rgba(0, 0, 0, 0.8); border-width: 1px; border-color: rgb(51, 51, 51); border-radius: 4px; color: rgb(255, 255, 255); font: 14px / 21px Microsoft YaHei; text-align: left; padding: 10px 12px; '
imgelement = driver.find_element_by_xpath("//div[@style='{style_}']".format(style_=style1))
我想定位这个悬浮框,用style属性定位吗?能不能说下思路
我先把后面的内容整个复制过来了,但是显示找不到元素
还有另一个问题是这样的文本如何定位呢!非常感谢!!!