MCPcopy Create free account
hub / github.com/tebeka/selenium / testLocationInView

Function testLocationInView

remote_test.go:1325–1345  ·  view source on GitHub ↗
(t *testing.T, c config)

Source from the content-addressed store, hash-verified

1323}
1324
1325func testLocationInView(t *testing.T, c config) {
1326 wd := newRemote(t, c)
1327 defer quitRemote(t, wd)
1328
1329 if err := wd.Get(serverURL); err != nil {
1330 t.Fatalf("wd.Get(%q) returned error: %v", serverURL, err)
1331 }
1332 button, err := wd.FindElement(ByID, "submit")
1333 if err != nil {
1334 t.Fatal(err)
1335 }
1336
1337 loc, err := button.LocationInView()
1338 if err != nil {
1339 t.Fatal(err)
1340 }
1341
1342 if loc.X == 0 || loc.Y == 0 {
1343 t.Fatalf("Bad location: %v\n", loc)
1344 }
1345}
1346
1347func testSize(t *testing.T, c config) {
1348 wd := newRemote(t, c)

Callers

nothing calls this directly

Calls 5

newRemoteFunction · 0.85
quitRemoteFunction · 0.85
GetMethod · 0.65
FindElementMethod · 0.65
LocationInViewMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…