0
0
Fork 0

Test the page position after clicking the Familiar or Unfamiliar button.

BugFix254-Author-ZhanJianhao^2
Zjh-jc 2021-06-17 09:41:33 +08:00
parent 006a144ec0
commit f7629f4d1c
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ def test_by_random(text):
try:
location = driver.find_element_by_xpath('//a[@name="aaa"]').location # 点击后单词次数≥1
roll_height = get_scrollTop() # 获取滚动条的位置
assert int(location - roll_height) == 0 # 差值小于1
assert int(location['y'] - roll_height) == 0 # 差值小于1
except NoSuchElementException: # 点击后单词消失scrollTop=0页面回到最上面
roll_height = get_scrollTop()
assert roll_height == 0