mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-17 11:47:37 +08:00
Merge 'feature/huangin/right_click' into 'wings'
feat: add right clcik and webid See merge request: !67
This commit is contained in:
@@ -223,7 +223,7 @@ func (wd *BrowserWebDriver) tapBySelector(selector string, options ...option.Act
|
||||
return err
|
||||
}
|
||||
|
||||
func (wd *BrowserWebDriver) RightClick(x, y int) (err error) {
|
||||
func (wd *BrowserWebDriver) RightClick(x, y float64) (err error) {
|
||||
data := map[string]interface{}{
|
||||
"x": x,
|
||||
"y": y,
|
||||
|
||||
@@ -116,7 +116,7 @@ type IXTDriver interface {
|
||||
type IBrowserWebDriver interface {
|
||||
IDriver
|
||||
Hover(x, y float64) (err error)
|
||||
RightClick(x, y int) (err error)
|
||||
RightClick(x, y float64) (err error)
|
||||
Scroll(delta int) (err error)
|
||||
UploadFile(x, y float64, FileUrl, FileFormat string) (err error)
|
||||
}
|
||||
|
||||
@@ -124,14 +124,15 @@ func (wd *StubBrowserDriver) LoginNoneUI(packageName, phoneNumber string, captch
|
||||
"url": packageName,
|
||||
"web_cookie": password,
|
||||
}
|
||||
_, err = wd.HttpPOST(data, wd.sessionId, "stub/login")
|
||||
resp, err := wd.HttpPOST(data, wd.sessionId, "stub/login")
|
||||
|
||||
if err != nil {
|
||||
return info, err
|
||||
}
|
||||
respdata := resp.Data.(map[string]interface{})
|
||||
loginSuccss := AppLoginInfo{
|
||||
IsLogin: true,
|
||||
Uid: wd.sessionId,
|
||||
Uid: respdata["webid"].(string),
|
||||
Did: password,
|
||||
}
|
||||
return loginSuccss, err
|
||||
|
||||
Reference in New Issue
Block a user