我有一个应用程序,它的一个页面返回一个 XML 字符串(类型 text/xml)。结果是“内联”返回的,因此当我在 Firefox 中加载该页面时,我会看到 XML 字符串。
我想在 Firefox 中使用 Selenium IDE 插件来验证此页面上是否存在某些文本。但是,当我尝试使用VerifyTextPresent
命令执行此操作时,出现错误Couldn't access document.body. Is this HTML page fully loaded?
。
甚至可以在 Selenium 中对 XML 输出进行这种检查吗?如果是这样,怎么做?
以下是页面生成的片段:
<?xml version="1.0"?>
<alerts time_generated="2011-01-20 20:34:01" version="2.00" time_generated_epoch="1295584441">
<alert>
<client_updates/>
<contact_firstname>Brian</contact_firstname>
...