0
我试图使用ghost inspector chrome扩展来创建测试,但它不可能运行它们,因为网站不在线并且使用https,与ngrok不想正常工作。我发现有选择导出测试到硒格式,它给了我这样的HTML:如何从节点或python webdriver运行html selenium测试?
<meta name="ghost-inspector-screenshotCompareThreshold" content="0.1" />
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Registration</td>
</tr>
</thead>
<tbody>
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>css=a[href="#/registration"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>css=a[href="#/registration"]</td>
<td></td>
</tr>
如何从该文件运行测试?我需要安装和执行什么?
那么,硒IDE不允许我重写基准URL进行测试,并且我没有找到Selenium生成器可以在哪里输出案例。但是如果你更了解Ghost Inspector,可能是我用错了吗? – Bunyk
Selenium IDE应该在其窗口顶部有一个“基本URL”字段。如果你按照上面的Selenium IDE链接,你可以在右侧的截图中看到它。要使用Selenium Builder转换测试,请打开Selenium Builder扩展,然后选择“文件”>“打开套件或脚本”。选择您从Ghost Inspector下载的HTML文件,然后选择“文件”>“导出...”,您将获得许多不同的导出格式。 –