Skip to content

Commit

Permalink
浏览器类命名优化
Browse files Browse the repository at this point in the history
  • Loading branch information
ll committed Jun 2, 2021
1 parent 49db133 commit 670eddb
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions pyefun/seleniumUtil/seleniumUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,14 @@ def 进入Frame页面(self, Frame标识):
self.浏览器.switch_to.frame(Frame标识)
return True

def 置最外层Frame框架(self):

self.浏览器.switch_to.frame_content()

def 置上一层Frame框架(self):

self.浏览器.switch_to.partent_frame()

@异常处理返回类型逻辑型
def 退出Frame页面(self):
self.浏览器.switch_to.default_content()
Expand Down Expand Up @@ -448,7 +456,7 @@ def 滚动条靠顶(self):
return True

@异常处理返回类型逻辑型
def 滚动条_靠底(self):
def 滚动条靠底(self):
'通过javascript设置浏览器窗口的滚动条位置'
js = "var q=document.documentElement.scrollTop=10000"
self.浏览器.execute_script(js)
Expand Down Expand Up @@ -495,7 +503,7 @@ def 置浏览器坐标_宽度高度(self, 左边=None, 顶边=None, 宽度=None,
return True

@异常处理返回类型逻辑型
def 鼠标松开(self):
def 鼠标抬起(self):
'释放按住的鼠标键'
ActionChains(self.浏览器).release().perform()
return True
Expand Down Expand Up @@ -590,7 +598,7 @@ def 鼠标悬停(self):
return True

@异常处理返回类型逻辑型
def 鼠标右键单击(self):
def 鼠标右键按下(self):
ActionChains(self.浏览器).context_click(self.元素).perform()
return True

Expand Down Expand Up @@ -636,7 +644,7 @@ def 鼠标移动(self, X偏移量, Y偏移量):
return True

@异常处理返回类型逻辑型
def 鼠标松开(self):
def 鼠标抬起(self):
'释放元素上按住的鼠标键'
ActionChains(self.浏览器).release(self.元素).perform()
return True
Expand Down

0 comments on commit 670eddb

Please sign in to comment.