mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-28 02:51:42 +08:00
refactor: clean up function signatures in DriverSession and WDADriver for improved readability
This commit is contained in:
@@ -1 +1 @@
|
||||
v5.0.0-beta-2506261437
|
||||
v5.0.0-beta-2506261443
|
||||
|
||||
@@ -156,8 +156,7 @@ func (s *DriverSession) DELETE(urlStr string) (rawResp DriverRawResponse, err er
|
||||
}
|
||||
|
||||
func (s *DriverSession) RequestWithRetry(method string, urlStr string, rawBody []byte) (
|
||||
rawResp DriverRawResponse, err error,
|
||||
) {
|
||||
rawResp DriverRawResponse, err error) {
|
||||
for count := 1; count <= s.maxRetry; count++ {
|
||||
rawResp, err = s.Request(method, urlStr, rawBody)
|
||||
if err == nil {
|
||||
@@ -180,8 +179,7 @@ func (s *DriverSession) RequestWithRetry(method string, urlStr string, rawBody [
|
||||
}
|
||||
|
||||
func (s *DriverSession) Request(method string, urlStr string, rawBody []byte) (
|
||||
rawResp DriverRawResponse, err error,
|
||||
) {
|
||||
rawResp DriverRawResponse, err error) {
|
||||
// build final URL
|
||||
rawURL, err := s.buildURL(urlStr)
|
||||
if err != nil {
|
||||
|
||||
@@ -179,7 +179,6 @@ func (wd *WDADriver) DeleteSession() (err error) {
|
||||
wd.mjpegClient.CloseIdleConnections()
|
||||
}
|
||||
|
||||
// [[FBRoute DELETE:@""] respondWithTarget:self action:@selector(handleDeleteSession:)]
|
||||
wd.Session.client.CloseIdleConnections()
|
||||
return
|
||||
}
|
||||
@@ -625,7 +624,7 @@ func (wd *WDADriver) Drag(fromX, fromY, toX, toY float64, opts ...option.ActionO
|
||||
"toY": builtin.RoundToOneDecimal(toY),
|
||||
}
|
||||
option.MergeOptions(data, opts...)
|
||||
// wda 43 version
|
||||
// wda 50 version
|
||||
_, err = wd.Session.POST(data, "/wings/interaction/drag")
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user