I have the following Cucumber step where I am trying to verify that the
value of this element is empty, i.e. no characters:
Then I should see "" within the "dominant_occiput" selector cell
It hits the following custom step where I am using XPath to focus in on
the
element, of course this step also should accept text and also match on
that
value:
Then /^I should see “([^”])" within the “([^”])" selector cell$/ do
|text, id|
msg = “No selector_cell found with the content of ‘#{text}’ and id
of
#{id}”
assert page.find(:xpath,"//*[@id=’#{id}’ and contains(concat(’
‘,normalize-space(@class),’ ‘),’ selector_cell ‘) and
text()=’#{(text)}’]",
:visible => true)
end
Is there a way to do this? I see some writing online that XPath does not
recognize ‘empty’ situations. Is this true/and/or is there a better way?
Thanks,
David