Merge 'feature/huangin/right_click' into 'wings'

feat: add right clcik and webid

See merge request: !67
This commit is contained in:
余泓铮
2025-02-26 07:45:23 +00:00
7 changed files with 26 additions and 5 deletions

View File

@@ -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,

View File

@@ -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)
}

View File

@@ -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