change: update NewData function

This commit is contained in:
xucong.053
2022-10-17 15:28:46 +08:00
parent 0e248882b1
commit 317ec4fde8
7 changed files with 17 additions and 37 deletions

View File

@@ -31,8 +31,7 @@ func (we wdaElement) SendKeys(text string, options ...DataOption) (err error) {
"value": strings.Split(text, ""),
}
// new data options in post data for extra uiautomator configurations
d := NewData(options...)
d.MergeData(data)
d := NewData(data, options...)
_, err = we.parent.httpPOST(d.Data, "/session", we.parent.sessionId, "/element", we.id, "/value")
return