Visualize / Show mouse cursor position in selenium 2 tests (for example PHPUnit Webdriver)

前端 未结 4 1813
悲哀的现实
悲哀的现实 2021-01-01 04:50

I am running \\PHPUnit_Extensions_Selenium2TestCase to run tests which move the mouse and make clicks ($this->moveto). For improved debugging an

4条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 05:10

    Execute a javascript after each page load which enabled the mouse cursor display.

        /**
         * Enable mouse cursor display
         */
        protected function enableCursor()
        {
            $this->execute(array('script' => << array()));
        }
    

    This depends on JQuery beeing loaded in the target page - another solution , without the fancy animation, is also possible.

提交回复
热议问题