Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steps doesn't show in report when these steps are defined in page class which extends PageObject. #2105

Closed
ldy810 opened this issue May 25, 2020 · 1 comment

Comments

@ldy810
Copy link

ldy810 commented May 25, 2020

Hi,
You can create a class like as below code, then call the step in Test, the step's description will not show in report.

package pages.home;

import net.thucydides.core.annotations.Step;
import net.thucydides.core.pages.PageObject;

public class Login extends PageObject {

 	String actor;
 
    @Step("#actor open url with {0}")
    public void startsWith(String url) {
    	//open();
    }

}

@ldy810 ldy810 closed this as completed May 25, 2020
@ldy810
Copy link
Author

ldy810 commented May 25, 2020

Call the step, if use "@Managed" annotation, steps will not show, if we comment out the code "@Managed WebDriver driver", step shows ok:

@RunWith(SerenityRunner.class)
public class TestLogin {
@Managed
WebDriver driver;

@Steps
Login michael;

@Test

public void addingSums() {
    // Given
   michael.startsWith("213232");

}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants