Permalink
Browse files

MDL-51988 behat: select a table by <th> tag

  • Loading branch information...
danpoltawski committed Nov 11, 2015
1 parent e30f11e commit a15378e43126cc994f94736885f36455bd0f0f0d
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/behat/classes/behat_selectors.php
@@ -131,7 +131,7 @@ class behat_selectors {
[./descendant::*[self::h2][normalize-space(.) = %locator%] or %locator% = 'frontpage']
XPATH
, 'table' => <<<XPATH
.//table[(./@id = %locator% or contains(.//caption, %locator%) or contains(concat(' ', normalize-space(@class), ' '), %locator% ))]
.//table[(./@id = %locator% or contains(.//caption, %locator%) or contains(.//th, %locator%) or contains(concat(' ', normalize-space(@class), ' '), %locator% ))]
XPATH
, 'table_row' => <<<XPATH
.//tr[contains(normalize-space(.), %locator%) and not(.//tr[contains(normalize-space(.), %locator%)])]

0 comments on commit a15378e

Please sign in to comment.