MCPcopy Create free account
hub / github.com/tebeka/selenium / DecodeElement

Method DecodeElement

remote.go:690–704  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

688}
689
690func (wd *remoteWD) DecodeElement(data []byte) (WebElement, error) {
691 reply := new(struct{ Value map[string]string })
692 if err := json.Unmarshal(data, &reply); err != nil {
693 return nil, err
694 }
695
696 id := elementIDFromValue(reply.Value)
697 if id == "" {
698 return nil, fmt.Errorf("invalid element returned: %+v", reply)
699 }
700 return &remoteWE{
701 parent: wd,
702 id: id,
703 }, nil
704}
705
706const (
707 // legacyWebElementIdentifier is the string constant used in the old

Callers 2

FindElementMethod · 0.95
ActiveElementMethod · 0.95

Calls 1

elementIDFromValueFunction · 0.85

Tested by

no test coverage detected