@@ 797-803 (lines=7) @@ | ||
794 | /** |
|
795 | * @Then /^the "([^"]*)" table should contain "([^"]*)"$/ |
|
796 | */ |
|
797 | public function theTableShouldContain($selector, $text) |
|
798 | { |
|
799 | $table = $this->getTable($selector); |
|
800 | ||
801 | $element = $table->find('named', array('content', "'$text'")); |
|
802 | assertNotNull($element, sprintf('Element containing `%s` not found in `%s` table', $text, $selector)); |
|
803 | } |
|
804 | ||
805 | /** |
|
806 | * @Then /^the "([^"]*)" table should not contain "([^"]*)"$/ |
|
@@ 808-814 (lines=7) @@ | ||
805 | /** |
|
806 | * @Then /^the "([^"]*)" table should not contain "([^"]*)"$/ |
|
807 | */ |
|
808 | public function theTableShouldNotContain($selector, $text) |
|
809 | { |
|
810 | $table = $this->getTable($selector); |
|
811 | ||
812 | $element = $table->find('named', array('content', "'$text'")); |
|
813 | assertNull($element, sprintf('Element containing `%s` not found in `%s` table', $text, $selector)); |
|
814 | } |
|
815 | ||
816 | /** |
|
817 | * @Given /^I click on "([^"]*)" in the "([^"]*)" table$/ |
|
@@ 819-826 (lines=8) @@ | ||
816 | /** |
|
817 | * @Given /^I click on "([^"]*)" in the "([^"]*)" table$/ |
|
818 | */ |
|
819 | public function iClickOnInTheTable($text, $selector) |
|
820 | { |
|
821 | $table = $this->getTable($selector); |
|
822 | ||
823 | $element = $table->find('xpath', sprintf('//*[count(*)=0 and contains(.,"%s")]', $text)); |
|
824 | assertNotNull($element, sprintf('Element containing `%s` not found', $text)); |
|
825 | $element->click(); |
|
826 | } |
|
827 | ||
828 | /** |
|
829 | * Finds the first visible table by various factors: |