Search . not child::text() for content
The former is more accurate, and we don't need the exact count.
This commit is contained in:
parent
16258d34d9
commit
6f1556254b
|
@ -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={})
|
||||
|
|
Loading…
Reference in New Issue