0
我会发布一个示例,并想知道在不停止脚本的情况下,“IDEAL”窗口中的IDE操作的解决方案是什么。我会 提供一个在线的例子,我建立的脚本:没有详细 工作...Selenium ShowDialogic Modal
<?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="http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/showModalDialog2.htm" />
<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>
<!--//Open the application and wait to load the combobox-->
<tr>
<td>open</td>
<td>/workshop/samples/author/dhtml/refs/showModalDialog2.htm</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=oHeight</td>
<td></td>
</tr>
<!--//Insert height value and click "Push To Create" button-->
<tr>
<td>select</td>
<td>name=oHeight</td>
<td>label=250</td>
</tr>
<tr>
<td>click</td>
<td>css=input[type="button"]</td>
<td></td>
</tr>
<!--//Wait for the loading the modal page title and check the text -->
<tr>
<td>waitForElementPresent</td>
<td>//h1</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>This is a modal dialog box. This page is not designed to do
anything except display the dialog box arguments.</td>
<td></td>
</tr>
<!--//close the screen and verify that the previous screen is loaded from the height field-->
<tr>
<td>close</td>
<td></td>
<td></td>
</tr>
<tr>
<td>selectWindow</td>
<td>null</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=oHeight</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
你可以修改脚本使其工作吗? TKS –