package com.Demo.pages;
import org.openqa.selenium.WebDriver;
//import org.openqa.selenium.WebElement;
//import io.appium.java_client.AppiumDriver;
//import io.appium.java_client.MobileDriver;
//import io.appium.java_client.MobileElement;
//import io.appium.java_client.TouchAction;
import net.serenitybdd.core.annotations.findby.FindBy;
import net.serenitybdd.core.pages.PageObject;
import net.serenitybdd.core.pages.WebElementFacade;
public class LandingPage extends PageObject {
public LandingPage(WebDriver driver) {
super(driver);
}
@FindBy(xpath="//UIAApplication[1]/UIAWindow[1]/UIATableView[1]/UIATableCell[2]")
private WebElementFacade controlBtn;
@FindBy(xpath = "//UIAApplication[1]/UIAWindow[1]/UIANavigationBar[1]/UIAStaticText[1]")
private WebElementFacade screenTitle;
// AppiumDriver<MobileElement> wazz = ((AppiumDriver<MobileElement>) ((WebDriverFacade) getDriver()).getProxiedDriver());
// TouchAction actions = new TouchAction((MobileDriver)wazz) ;
public void iamOnTheLandingPage() {
// TODO Auto-generated method stub
}
public void clickOnControlOption() {
// TODO Auto-generated method stub
controlBtn.click();
}
public void verifyPageTitle() {
// TODO Auto-generated method stub
}
}
On "controlBtn.click();" I get the following error
"org.openqa.selenium.WebDriverException: Return statements are only valid inside functions."
Note: It works fine if I use WebElement instead of WebElementFacade.
Any idea as to why I'm getting this error or anything that I'm doing incorrectly. Thanks.
--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-users+unsubscribe@googlegroups.com.
To post to this group, send email to thucydides-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[main] ERROR net.serenitybdd.core.Serenity - TEST FAILED AT STEP When I click on Controls option
[main] ERROR net.serenitybdd.core.Serenity - Return statements are only valid inside functions. (WARNING: The server did not provide any stacktrace information)
(Also, is there any demo project with Serenity - Appium - iOs native apps) that I can refer. Thanks)
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
When I used web element facade , i was also not successful. Had to go back to web element to make the script running for iOS. There was no error, but no actions were performed.
--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-users+unsubscribe@googlegroups.com.
To post to this group, send an email to thucydides-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.