How do I run a PHPUnit Selenium test without having a new browser window run for each function?

前端 未结 5 1835
逝去的感伤
逝去的感伤 2021-01-13 05:06

I am trying to run a selenium test case using PHPUnit. And the first thing I do is trying the login function, this works perfect but then I want to run a function to check i

5条回答
  •  执念已碎
    2021-01-13 05:35

    An elegant way to set the session shared is to use PHPUnit's setUpBeforeClass() method:

    public static function setUpBeforeClass()
    {
        self::shareSession(true);
    }
    

提交回复
热议问题