(data []byte)
| 688 | } |
| 689 | |
| 690 | func (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 | |
| 706 | const ( |
| 707 | // legacyWebElementIdentifier is the string constant used in the old |
no test coverage detected