mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-11 18:59:39 +08:00
Feat/yuhongzheng/pre auto install
* fix: fix rotate tap swipe error * fix: default input frequency from 60 to 10 * fix: error getting window size during screen rotation * fix: kuake input unicode error * feat: android input by appium ime * feat: android swipe and tap with duration * fix: format import file * fix: format import file * feat: 新增按控件点击,获取设备应用,修改日志获取 * feat: 新增ui2控件点击 * fix: format file * fix: format file * Merge branch 'video-release' into 'feat/yuhongzheng/pre_auto_install' * merge * Merge branch 'feat/yuhongzheng/pre_auto_install' of… * fix: close reader * Merge branch 'video-release' into 'feat/yuhongzheng/pre_auto_install' * fix: format code * Merge branch 'feat/yuhongzheng/pre_auto_install' of… * fix: test send key https://code.byted.org/iesqa/httprunner/merge_requests/34
This commit is contained in:
@@ -207,6 +207,14 @@ func (wd *wdaDriver) WindowSize() (size Size, err error) {
|
||||
}
|
||||
size.Height = size.Height * int(scale)
|
||||
size.Width = size.Width * int(scale)
|
||||
orientation, err := wd.Orientation()
|
||||
if err != nil {
|
||||
log.Warn().Err(err).Msgf("window size get orientation failed, use default orientation")
|
||||
orientation = OrientationPortrait
|
||||
}
|
||||
if orientation != OrientationPortrait {
|
||||
size.Width, size.Height = size.Height, size.Width
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -547,8 +555,8 @@ func (wd *wdaDriver) DragFloat(fromX, fromY, toX, toY float64, options ...Action
|
||||
|
||||
// update data options in post data for extra WDA configurations
|
||||
actionOptions.updateData(data)
|
||||
|
||||
_, err = wd.httpPOST(data, "/session", wd.sessionId, "/wda/dragfromtoforduration")
|
||||
// wda 43 version
|
||||
_, err = wd.httpPOST(data, "/session", wd.sessionId, "/wda/drag")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -751,6 +759,14 @@ func (wd *wdaDriver) Source(srcOpt ...SourceOption) (source string, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (wd *wdaDriver) TapByText(text string, options ...ActionOption) error {
|
||||
return errDriverNotImplemented
|
||||
}
|
||||
|
||||
func (wd *wdaDriver) TapByTexts(actions ...TapTextAction) error {
|
||||
return errDriverNotImplemented
|
||||
}
|
||||
|
||||
func (wd *wdaDriver) AccessibleSource() (source string, err error) {
|
||||
// [[FBRoute GET:@"/wda/accessibleSource"] respondWithTarget:self action:@selector(handleGetAccessibleSourceCommand:)]
|
||||
// [[FBRoute GET:@"/wda/accessibleSource"].withoutSession
|
||||
|
||||
Reference in New Issue
Block a user