(t *testing.T, c config)
| 1532 | } |
| 1533 | |
| 1534 | func testIsSelected(t *testing.T, c config) { |
| 1535 | wd := newRemote(t, c) |
| 1536 | defer quitRemote(t, wd) |
| 1537 | |
| 1538 | if err := wd.Get(serverURL); err != nil { |
| 1539 | t.Fatalf("wd.Get(%q) returned error: %v", serverURL, err) |
| 1540 | } |
| 1541 | elem, err := wd.FindElement(ByID, "chuk") |
| 1542 | if err != nil { |
| 1543 | t.Fatal("Can't find element") |
| 1544 | } |
| 1545 | selected, err := elem.IsSelected() |
| 1546 | if err != nil { |
| 1547 | t.Fatal("Can't get selection") |
| 1548 | } |
| 1549 | |
| 1550 | if selected { |
| 1551 | t.Fatal("Already selected") |
| 1552 | } |
| 1553 | |
| 1554 | if err := elem.Click(); err != nil { |
| 1555 | t.Fatal("Can't click") |
| 1556 | } |
| 1557 | |
| 1558 | selected, err = elem.IsSelected() |
| 1559 | if err != nil { |
| 1560 | t.Fatal("Can't get selection") |
| 1561 | } |
| 1562 | |
| 1563 | if !selected { |
| 1564 | t.Fatal("Not selected") |
| 1565 | } |
| 1566 | } |
| 1567 | |
| 1568 | func testIsDisplayed(t *testing.T, c config) { |
| 1569 | wd := newRemote(t, c) |
nothing calls this directly
no test coverage detected