(t *testing.T, c config)
| 682 | } |
| 683 | |
| 684 | func testExtendedErrorMessage(t *testing.T, c config) { |
| 685 | // Bypass NewRemote which itself calls NewSession internally. |
| 686 | wd := &remoteWD{ |
| 687 | capabilities: newTestCapabilities(t, c), |
| 688 | urlPrefix: c.addr, |
| 689 | } |
| 690 | |
| 691 | var want string |
| 692 | switch { |
| 693 | case c.sauce != nil: |
| 694 | want = "404 Not Found" |
| 695 | case c.seleniumVersion.Major == 3: |
| 696 | want = "invalid session id:" |
| 697 | case c.browser == "firefox" && c.seleniumVersion.Major == 2: |
| 698 | want = "unknown error:" |
| 699 | case c.browser == "firefox" && c.seleniumVersion.Major == 0: |
| 700 | want = "unknown command" |
| 701 | case c.browser == "chrome": |
| 702 | want = "invalid session id:" |
| 703 | default: |
| 704 | want = "invalid session ID:" |
| 705 | } |
| 706 | if err := wd.Close(); err == nil || !strings.HasPrefix(err.Error(), want) { |
| 707 | t.Fatalf("Got error %q, expected error to start with %q", err, want) |
| 708 | } |
| 709 | } |
| 710 | |
| 711 | // TODO(ekg): does this method work anymore in any browser? It is not part of |
| 712 | // the W3C standard. |
nothing calls this directly
no test coverage detected
searching dependent graphs…