From 9311fea09b7eefb3cdcd3f266099348019b82484 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Tue, 26 May 2015 07:55:39 -0400
Subject: [PATCH] Add utility functiion to get an elemet's text content also when running tests in PhantomJS
---
tests/Selenium/bootstrap.php | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/tests/Selenium/bootstrap.php b/tests/Selenium/bootstrap.php
index cf547df..dc4897d 100644
--- a/tests/Selenium/bootstrap.php
+++ b/tests/Selenium/bootstrap.php
@@ -337,6 +337,11 @@
return $response;
}
+ protected function getText($element)
+ {
+ return $element->text() ?: $element->attribute('textContent');
+ }
+
protected function assertHasClass($classname, $element)
{
$this->assertContains($classname, $element->attribute('class'));
--
Gitblit v1.9.1