-1

我想保存元标记的内容,例如 <meta name="description" content="This is test meta description!" />

我试过这个:

<td>store</td>
<td>//meta[@name='description']</td>
<td>b</td>
</tr>
<tr>
<td>echo</td>
<td>${b}</td>
<td></td>
</tr>

我在 Selenium IDE 中的 echo 结果是:

[info] Executing: |echo | ${b} | |
[info] echo: //meta[@name='description']

但我需要获取内容。我怎样才能做到这一点?

4

1 回答 1

2

以下是场景的解决方案

storeAttribute  |  //meta[@name='description']@content  |  variable
echo  | ${variable}
于 2012-07-20T13:20:08.067 回答