Commits

Miki Tebeka  committed 67e387c

IsDiaplayed -> IsDisplayed (typo)

  • Participants
  • Parent commits eb9dd14

Comments (0)

Files changed (3)

 	return elem.boolQuery("/session/%%s/element/%s/enabled")
 }
 
-func (elem *remoteWE) IsDiaplayed() (bool, error) {
+func (elem *remoteWE) IsDisplayed() (bool, error) {
 	return elem.boolQuery("/session/%%s/element/%s/displayed")
 }
 

File remote_test.go

 	}
 }
 
+func TestIsDisplayed(t *testing.T) {
+	wd := newRemote("TestIsDisplayed", t)
+	defer wd.Quit()
+
+	wd.Get(serverURL)
+	elem, err := wd.FindElement(ById, "chuk")
+	if err != nil {
+		t.Fatal("Can't find element")
+	}
+	displayed, err := elem.IsDisplayed()
+	if err != nil {
+		t.Fatal("Can't check for displayed")
+	}
+
+	if !displayed {
+		t.Fatal("Not displayed")
+	}
+}
+
 // Test server
 
 var homePage = `
 	/* Check if element is enabled. */
 	IsEnabled() (bool, error)
 	/* Check if element is displayed. */
-	IsDiaplayed() (bool, error)
+	IsDisplayed() (bool, error)
 	/* Get element attribute. */
 	GetAttribute(name string) (string, error)
 	/* Element location. */