(t *testing.T, c config)
| 1033 | } |
| 1034 | |
| 1035 | func testFindElements(t *testing.T, c config) { |
| 1036 | wd := newRemote(t, c) |
| 1037 | defer quitRemote(t, wd) |
| 1038 | |
| 1039 | if err := wd.Get(serverURL); err != nil { |
| 1040 | t.Fatalf("wd.Get(%q) returned error: %v", serverURL, err) |
| 1041 | } |
| 1042 | elems, err := wd.FindElements(ByName, "q") |
| 1043 | if err != nil { |
| 1044 | t.Fatal(err) |
| 1045 | } |
| 1046 | |
| 1047 | if len(elems) != 1 { |
| 1048 | t.Fatalf("Wrong number of elements %d (should be 1)", len(elems)) |
| 1049 | } |
| 1050 | |
| 1051 | we, ok := elems[0].(*remoteWE) |
| 1052 | if !ok { |
| 1053 | t.Fatal("Can't convert to *remoteWE") |
| 1054 | } |
| 1055 | |
| 1056 | if len(we.id) == 0 { |
| 1057 | t.Fatal("Empty element") |
| 1058 | } |
| 1059 | |
| 1060 | if we.parent != wd { |
| 1061 | t.Fatal("Bad parent") |
| 1062 | } |
| 1063 | } |
| 1064 | |
| 1065 | func testSendKeys(t *testing.T, c config) { |
| 1066 | wd := newRemote(t, c) |
nothing calls this directly
no test coverage detected