Updating to latest protocol definitions
diff --git a/accessibility/accessibility.go b/accessibility/accessibility.go
index 9b17738..278f9fb 100644
--- a/accessibility/accessibility.go
+++ b/accessibility/accessibility.go
@@ -78,7 +78,36 @@
return res.Nodes, nil
}
+// GetFullAXTreeParams fetches the entire accessibility tree.
+type GetFullAXTreeParams struct{}
+
+// GetFullAXTree fetches the entire accessibility tree.
+func GetFullAXTree() *GetFullAXTreeParams {
+ return &GetFullAXTreeParams{}
+}
+
+// GetFullAXTreeReturns return values.
+type GetFullAXTreeReturns struct {
+ Nodes []*Node `json:"nodes,omitempty"`
+}
+
+// Do executes Accessibility.getFullAXTree against the provided context.
+//
+// returns:
+// nodes
+func (p *GetFullAXTreeParams) Do(ctxt context.Context, h cdp.Executor) (nodes []*Node, err error) {
+ // execute
+ var res GetFullAXTreeReturns
+ err = h.Execute(ctxt, CommandGetFullAXTree, nil, &res)
+ if err != nil {
+ return nil, err
+ }
+
+ return res.Nodes, nil
+}
+
// Command names.
const (
CommandGetPartialAXTree = "Accessibility.getPartialAXTree"
+ CommandGetFullAXTree = "Accessibility.getFullAXTree"
)
diff --git a/accessibility/easyjson.go b/accessibility/easyjson.go
index 4ce4114..fd6d4e7 100644
--- a/accessibility/easyjson.go
+++ b/accessibility/easyjson.go
@@ -1135,3 +1135,175 @@
func (v *GetPartialAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(l, v)
}
+func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(in *jlexer.Lexer, out *GetFullAXTreeReturns) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "nodes":
+ if in.IsNull() {
+ in.Skip()
+ out.Nodes = nil
+ } else {
+ in.Delim('[')
+ if out.Nodes == nil {
+ if !in.IsDelim(']') {
+ out.Nodes = make([]*Node, 0, 8)
+ } else {
+ out.Nodes = []*Node{}
+ }
+ } else {
+ out.Nodes = (out.Nodes)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v19 *Node
+ if in.IsNull() {
+ in.Skip()
+ v19 = nil
+ } else {
+ if v19 == nil {
+ v19 = new(Node)
+ }
+ (*v19).UnmarshalEasyJSON(in)
+ }
+ out.Nodes = append(out.Nodes, v19)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(out *jwriter.Writer, in GetFullAXTreeReturns) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if len(in.Nodes) != 0 {
+ const prefix string = ",\"nodes\":"
+ if first {
+ first = false
+ out.RawString(prefix[1:])
+ } else {
+ out.RawString(prefix)
+ }
+ {
+ out.RawByte('[')
+ for v20, v21 := range in.Nodes {
+ if v20 > 0 {
+ out.RawByte(',')
+ }
+ if v21 == nil {
+ out.RawString("null")
+ } else {
+ (*v21).MarshalEasyJSON(out)
+ }
+ }
+ out.RawByte(']')
+ }
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v GetFullAXTreeReturns) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v GetFullAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *GetFullAXTreeReturns) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *GetFullAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(l, v)
+}
+func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(in *jlexer.Lexer, out *GetFullAXTreeParams) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(out *jwriter.Writer, in GetFullAXTreeParams) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v GetFullAXTreeParams) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v GetFullAXTreeParams) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *GetFullAXTreeParams) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *GetFullAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(l, v)
+}
diff --git a/cdproto.go b/cdproto.go
index d09c2ee..76ff9e6 100644
--- a/cdproto.go
+++ b/cdproto.go
@@ -71,6 +71,7 @@
// MethodType values.
const (
CommandAccessibilityGetPartialAXTree = accessibility.CommandGetPartialAXTree
+ CommandAccessibilityGetFullAXTree = accessibility.CommandGetFullAXTree
CommandAnimationDisable = animation.CommandDisable
CommandAnimationEnable = animation.CommandEnable
CommandAnimationGetCurrentTime = animation.CommandGetCurrentTime
@@ -606,6 +607,9 @@
case CommandAccessibilityGetPartialAXTree:
v = new(accessibility.GetPartialAXTreeReturns)
+ case CommandAccessibilityGetFullAXTree:
+ v = new(accessibility.GetFullAXTreeReturns)
+
case CommandAnimationDisable:
return emptyVal, nil