(t *testing.T, c config)
| 1605 | } |
| 1606 | |
| 1607 | func testActiveElement(t *testing.T, c config) { |
| 1608 | if c.browser == "htmlunit" { |
| 1609 | // TODO(minusnine): figure out why ActiveElement doesn't work in HTMLUnit. |
| 1610 | t.Skip("ActiveElement does not work in HTMLUnit") |
| 1611 | } |
| 1612 | wd := newRemote(t, c) |
| 1613 | defer quitRemote(t, wd) |
| 1614 | |
| 1615 | if err := wd.Get(serverURL); err != nil { |
| 1616 | t.Fatalf("wd.Get(%q) returned error: %v", serverURL, err) |
| 1617 | } |
| 1618 | |
| 1619 | e, err := wd.ActiveElement() |
| 1620 | if err != nil { |
| 1621 | t.Fatalf("wd.ActiveElement() returned error: %v", err) |
| 1622 | } |
| 1623 | name, err := e.GetAttribute("name") |
| 1624 | if err != nil { |
| 1625 | t.Fatalf("wd.ActiveElement().GetAttribute() returned error: %v", err) |
| 1626 | } |
| 1627 | if name != "q" { |
| 1628 | t.Fatalf("wd.ActiveElement().GetAttribute() returned element with name = %q, expected name = 'q'", name) |
| 1629 | } |
| 1630 | } |
| 1631 | |
| 1632 | func testKeyDownUp(t *testing.T, c config) { |
| 1633 | wd := newRemote(t, c) |
nothing calls this directly
no test coverage detected
searching dependent graphs…