mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-30 21:09:36 +08:00
feat: add browser driver
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
func GetDriver(c *gin.Context) (driverExt *driver_ext.XTDriver, err error) {
|
||||
platform := c.Param("platform")
|
||||
serial := c.Param("serial")
|
||||
deviceObj, exists := c.Get("device")
|
||||
var device uixt.IDevice
|
||||
var driver uixt.IDriver
|
||||
@@ -29,6 +30,8 @@ func GetDriver(c *gin.Context) (driverExt *driver_ext.XTDriver, err error) {
|
||||
driver, err = driver_ext.NewStubAndroidDriver(device.(*uixt.AndroidDevice))
|
||||
case "ios":
|
||||
driver, err = driver_ext.NewStubIOSDriver(device.(*uixt.IOSDevice))
|
||||
case "browser":
|
||||
driver, err = driver_ext.NewStubBrowserDriver(serial)
|
||||
}
|
||||
if err != nil {
|
||||
server.RenderErrorInitDriver(c, err)
|
||||
|
||||
@@ -9,7 +9,7 @@ type AppInstallRequest struct {
|
||||
|
||||
type LoginRequest struct {
|
||||
PackageName string `json:"packageName"`
|
||||
PhoneNumber string `json:"phoneNumber" binding:"required"`
|
||||
PhoneNumber string `json:"phoneNumber"`
|
||||
Captcha string `json:"captcha" binding:"required_without=Password"`
|
||||
Password string `json:"password" binding:"required_without=Captcha"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user