(t *testing.T, c config)
| 596 | } |
| 597 | |
| 598 | func testNewSession(t *testing.T, c config) { |
| 599 | // Bypass NewRemote which itself calls NewSession internally. |
| 600 | wd := &remoteWD{ |
| 601 | capabilities: newTestCapabilities(t, c), |
| 602 | urlPrefix: c.addr, |
| 603 | } |
| 604 | defer func() { |
| 605 | if err := wd.Quit(); err != nil { |
| 606 | t.Errorf("wd.Quit() returned error: %v", err) |
| 607 | } |
| 608 | }() |
| 609 | |
| 610 | sid, err := wd.NewSession() |
| 611 | if err != nil { |
| 612 | t.Fatalf("error in new session - %s", err) |
| 613 | } |
| 614 | |
| 615 | if len(sid) == 0 { |
| 616 | t.Fatal("Empty session id") |
| 617 | } |
| 618 | |
| 619 | if wd.id != sid { |
| 620 | t.Fatal("Session id mismatch") |
| 621 | } |
| 622 | |
| 623 | if wd.SessionID() != sid { |
| 624 | t.Fatalf("Got session id mismatch %s != %s", sid, wd.SessionID()) |
| 625 | } |
| 626 | |
| 627 | if c.browser != "htmlunit" && wd.browserVersion.Major == 0 { |
| 628 | t.Fatalf("wd.browserVersion.Major = %d, expected > 0", wd.browserVersion.Major) |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | func testDeleteSession(t *testing.T, c config) { |
| 633 | wd := newRemote(t, c) |
nothing calls this directly
no test coverage detected