-
Notifications
You must be signed in to change notification settings - Fork 10
Elements
alvarolaserna edited this page Jul 22, 2019
·
2 revisions
Same element can be defined for all the platforms, i.e. same element definition for iOS, android and computer Browser:
UIElement element = E(byId(“your.Id”));
But in most cases the elements are different for each platform. For those cases you can specify elements for specific platforms this way:
UIElement element = E(byId(“your.Id”))
.selenideElement(byXpath("//some""))
.iOSElement(byCssSelector(".something""));
element.given().when().then().and()
element.click()
element.sendKeys(String value)
element.setValueJs(String value)/setValueJs(String value, boolean clickBeforeSetValue)
element.getText()
element.getValue()
element.getAttribute("attribute")
element.scrollTo(). ( view() , click() , view(String JavaScript_Options_for_scrollIntoView_method) , customSwipeUp(int PixelGap, int numberOfSwipes) , customSwipeDown(int PixelGap, int numberOfSwipes), swipeLeft(int PixelGap, int startX, int startY) and swipeRigt(int PixelGap, int startX, int startY))
element.swipe(element)
element.swipeLeft()
element.swipeRight()
element.executeJsOverElement(String script)
element.executeJs(String var1, Object... var2);
element.(shouldBe()/shouldHave())
(.not())
.visible()
.enabled()
.Exists()
.exactText("someText")/containText("")/containNoCaseSensitiveText("")
.value("someValue")
.attribute("attributeName").equalTo("value")
.theAttribute("attribute")
element.waitFor(timeInteger)
.untilIs(Not)Visible()
.untilIs(Not)Enabled()
.until(Not)Exist()
.untilHas(Not)Text("someText")
.untilHas(Not)Value("someValue")
.untilHas(Not)Attribute("someAttribute")