Selenium IDE 2.9.1 录制后不显示 selenium 脚本
Selenium IDE 2.9.1 is not showing the selenium script after recording
我刚刚安装了selenium IDE 2.9.1 并记录了一个测试用例。但是当检查源代码时,它只显示 HTML,而不是 selenium 脚本。
<?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.in/" />
<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>/?gws_rd=ssl</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=Passwd</td>
<td>arunkojndfjn</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>id=signIn</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
如何获取 selenium 脚本?谢谢
将 selenium IDE 脚本转换为可以在 Webdriver 中 运行 的脚本不是通过查看文件来完成的,因为文件本身是以 [=13] 的 selenium 特定格式编写的=].您需要使用 selenium IDE 本身的选项。如果您转到 "File > Export Test Case as",您将获得可以将测试导出为的各种语言的列表。
我刚刚安装了selenium IDE 2.9.1 并记录了一个测试用例。但是当检查源代码时,它只显示 HTML,而不是 selenium 脚本。
<?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.in/" />
<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>/?gws_rd=ssl</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=Passwd</td>
<td>arunkojndfjn</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>id=signIn</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
如何获取 selenium 脚本?谢谢
将 selenium IDE 脚本转换为可以在 Webdriver 中 运行 的脚本不是通过查看文件来完成的,因为文件本身是以 [=13] 的 selenium 特定格式编写的=].您需要使用 selenium IDE 本身的选项。如果您转到 "File > Export Test Case as",您将获得可以将测试导出为的各种语言的列表。