Selenium没有重播我的测试

时间:2013-02-06 14:43:03

标签: selenium selenium-ide

我使用SeleniumIDE进行了简单的硒测试。基本上打开google.co.uk,搜索“one”,单击它找到的链接,返回主页,搜索“two”单击链接。 它记录得很好,但是当我重播时,它在第二个命令停止,红色

中有以下内容
  

[error] element css = b not found

这是记录它的脚本xml。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head profile="http://selenium-ide.openqa.org/profiles/test-case">
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <link rel="selenium.base" href="https://www.google.co.uk/" />
     <title>New Test</title>
  </head>
  <body>
    <table cellpadding="1" cellspacing="1" border="1">
    <thead>
    <tr><td rowspan="1" colspan="3">New Test</td></tr>
    </thead><tbody>
    <tr>
       <td>open</td>
       <td>/</td>
       <td></td>
    </tr>
    <tr>
       <td>type</td>
       <td>id=gbqfq</td>
       <td>one</td>
    </tr>
    <tr>
       <td>click</td>
       <td>css=b</td>
       <td></td>
    </tr>
    <tr>
       <td>clickAndWait</td>
       <td>link=One Direction pose with dogs during tour rehearsals</td>
       <td></td>
    </tr>
    <tr>
       <td>type</td>
       <td>id=gbqfq</td>
       <td>two</td>
    </tr>
    <tr>
       <td>click</td>
       <td>css=tr.gssb_i &gt; td.gssb_a.gbqfsf &gt; div.gsq_a &gt; table &gt; tbody &gt; tr &gt; td &gt; span &gt; b</td>
       <td></td>
    </tr>
    <tr>
       <td>clickAndWait</td>
       <td>link=Sports Heads Football 2</td>
       <td></td>
    </tr>

    </tbody></table>
  </body>
</html>

0 个答案:

没有答案