我尝试使用以下命令运行selenium测试。
java -jar selenium-server-standalone-2.53.0.jar -htmlSuite "*firefox" "http://google.com" "/Users/abhee/Downloads/TestGoogle.html" "/Users/abhee/Downloads/results.html"
打开firefox并显示以下窗口。当我点击窗口中的任何按钮时,没有任何反应。有什么不对? ,我在控制台中看到以下消息:
The Components object is deprecated. It will soon be removed. atoms.js:5462:6
unreachable code after return statement htmlutils.js:6182:0
The character encoding declaration of the HTML document was not found when prescanning the first 1024 bytes of the file. When viewed in a differently-configured browser, this page will reload automatically. The encoding declaration needs to be moved to be within the first 1024 bytes of the file. Blank.html:100:0
Error: Permission denied to access property "frames"
selenium-remoterunner.js:538:21
Error: Permission denied to access property "frames"
selenium-remoterunner.js:538:21
The Components object is deprecated. It will soon be removed. atoms.js:5462:6
unreachable code after return statement htmlutils.js:6182:0
Error: Permission denied to access property "frames"
编辑:
代码中没有太多的loginc。它具有默认的Selenium IDE代码
<?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.com/" />
<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>
</tbody></table>
</body>
</html>
答案 0 :(得分:0)
不推荐使用Components对象。它很快就会删除。如果您尝试:可能会导致
window.open();
打开一个弹出窗口,但它被浏览器设置“阻止”。我想知道你的默认firefox配置文件是否被访问(?)你可以尝试在你的firefox配置文件中允许弹出窗口。