Search . not child::text() for content

The former is more accurate, and we don't need the exact count.
This commit is contained in:
Theo Hultberg and Jonas Nicklas 2009-11-16 21:43:06 +01:00 committed by Jonas Nicklas
parent 16258d34d9
commit 6f1556254b
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class Webcat::Session
end
def has_content?(content)
has_xpath?("//*[contains(child::text(),'#{content}')]")
has_xpath?("//*[contains(.,'#{content}')]")
end
def has_xpath?(path, options={})