|
@@ -612,9 +612,27 @@ func HijackReq(page *rod.Page, uri, xPath string) []byte {
|
|
|
MustElementX(page, xPath).MustClick()
|
|
|
data, err := GetHijackResp(ch, 10)
|
|
|
if err != nil {
|
|
|
- zaplog.LoggerS.Info(string(data))
|
|
|
panic(taxerr.NewWebStuckTitle(false))
|
|
|
}
|
|
|
_ = r.Stop()
|
|
|
return data
|
|
|
}
|
|
|
+
|
|
|
+// 输入文字 float
|
|
|
+func InputElementX(p *rod.Page, xPath, inputVal string) {
|
|
|
+ disabled := MustElementX(p, xPath).MustAttribute("disabled")
|
|
|
+ if disabled != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ readonly := MustElementX(p, xPath).MustAttribute("readonly")
|
|
|
+ if readonly != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ float := StrToFloat(inputVal)
|
|
|
+ if float == 0 {
|
|
|
+ inputVal = ""
|
|
|
+ } else {
|
|
|
+ inputVal = FloatToStr(float)
|
|
|
+ }
|
|
|
+ MustElementX(p, xPath).MustSelectAllText().MustInput(inputVal)
|
|
|
+}
|