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

Get SoftAsserts exception when some action performed on some page element in @BeforeMethod #614

Closed
esnelubov opened this Issue Oct 5, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@esnelubov

esnelubov commented Oct 5, 2017

The problem

Selenide throws Using soft asserts, but without @SoftAsserts annotation exception if there is some action performed on some page element in the test method annotated with TestNG' @BeforeMethod when using Soft Assertion Mode.

Environment

  • Selenide Version: 4.7
  • TestNG Version: 6.11

Code To Reproduce Issue

@Listeners({ SoftAsserts.class })
public class SimpleTest
{
    @BeforeClass
    public void beforeClass()
    {
        Configuration.browser = "chrome";
        Configuration.assertionMode = Configuration.AssertionMode.SOFT;
    }

    @BeforeMethod(alwaysRun = true)
    public void setUp()
    {
        Selenide.open("https://www.google.com/");
        $(By.xpath("//input[@name='btnI']")).click();
    }

    @Test
    public void testMethod()
    {

    }
}
@ostap-oleksyn

This comment has been minimized.

Show comment
Hide comment
@ostap-oleksyn

ostap-oleksyn Oct 5, 2017

Contributor

Can be fixed with this pull request.

Contributor

ostap-oleksyn commented Oct 5, 2017

Can be fixed with this pull request.

@asolntsev asolntsev self-assigned this Oct 7, 2017

@asolntsev asolntsev added this to the 4.8 milestone Oct 7, 2017

asolntsev added a commit that referenced this issue Oct 7, 2017

@asolntsev

This comment has been minimized.

Show comment
Hide comment
@asolntsev

asolntsev Oct 7, 2017

Member

Fixed in PR #615
Going to release in Selenide 4.8

Member

asolntsev commented Oct 7, 2017

Fixed in PR #615
Going to release in Selenide 4.8

@asolntsev asolntsev closed this Oct 7, 2017

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