@@ 57-69 (lines=13) @@ | ||
54 | * |
|
55 | * @return string Current page markup. |
|
56 | */ |
|
57 | private function getMarkupFromPhpBrowser() |
|
58 | { |
|
59 | $moduleName = 'PhpBrowser'; |
|
60 | if (!$this->moduleContainer->hasModule($moduleName)) { |
|
61 | throw new Exception(sprintf('"%s" module is not enabled.', $moduleName)); |
|
62 | } |
|
63 | ||
64 | /* @var $phpBrowser PhpBrowser */ |
|
65 | $phpBrowser = $this->moduleContainer->getModule($moduleName); |
|
66 | $markup = $phpBrowser->_getResponseContent(); |
|
67 | ||
68 | return $markup; |
|
69 | } |
|
70 | ||
71 | /** |
|
72 | * Returns current page markup form the `WebDriver` module. |
|
@@ 76-88 (lines=13) @@ | ||
73 | * |
|
74 | * @return string Current page markup. |
|
75 | */ |
|
76 | private function getMarkupFromWebDriver() |
|
77 | { |
|
78 | $moduleName = 'WebDriver'; |
|
79 | if (!$this->moduleContainer->hasModule($moduleName)) { |
|
80 | throw new Exception(sprintf('"%s" module is not enabled.', $moduleName)); |
|
81 | } |
|
82 | ||
83 | /* @var $webDriver WebDriver */ |
|
84 | $webDriver = $this->moduleContainer->getModule($moduleName); |
|
85 | $markup = $webDriver->webDriver->getPageSource(); |
|
86 | ||
87 | return $markup; |
|
88 | } |
|
89 | } |
|
90 |