Javascript 如何查看浏览器打开的弹出窗口的来源(从FireFox或Chrome)?

Javascript 如何查看浏览器打开的弹出窗口的来源(从FireFox或Chrome)?,javascript,html,google-chrome,selenium,firefox,Javascript,Html,Google Chrome,Selenium,Firefox,问题:我需要查看浏览器打开的弹出窗口的html源代码:如何从FireFox或Chrome查看该源代码 我正在使用Selenium IDE记录mobi文件到epub文件的转换。过程的最后一部分是选择另存为并按下OK按钮。 问题是在弹出窗口中单击鼠标右键无法打开下拉菜单来查看源代码。 那么,如何查看弹出窗口的源代码呢? 背景 Selenium IDE命令: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC

问题:我需要查看浏览器打开的弹出窗口的html源代码:如何从
FireFox
Chrome
查看该源代码

我正在使用
Selenium IDE
记录mobi文件到epub文件的转换。
过程的最后一部分是选择
另存为
并按下OK按钮。
问题是在弹出窗口中单击鼠标右键无法打开下拉菜单来查看源代码。
那么,如何查看弹出窗口的源代码呢?


背景
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="http://ebook.online-convert.com/convert-to-epub" />
<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>/convert-to-epub</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>css=h1</td>
    <td>Convert text to the ePub ebook format</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>css=li &gt; label</td>
    <td>Upload your document you want to convert to EPUB :</td>
</tr>
<tr>
    <td>type</td>
    <td>id=file</td>
    <td>C:\tmp\incoming\Top 100 Science Fiction and Fantasy Books as Voted by NPR-P2P(Epub, Mobi)\11. The Princess Bride by William Goldman\William Goldman - Princess Bride_ S. Morgenstern_The (v4.0).mobi</td>
</tr>
<tr>
    <td>click</td>
    <td>id=submit_button</td>
    <td></td>
</tr>
<tr>
    <td>waitForPopUp</td>
    <td>timeout</td>
    <td>60000</td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td></td>
    <td>&quot;OK&quot;</td>
</tr>

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

HTML源代码:

<?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://ebook.online-convert.com/convert-to-epub" />
<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>/convert-to-epub</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>css=h1</td>
    <td>Convert text to the ePub ebook format</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>css=li &gt; label</td>
    <td>Upload your document you want to convert to EPUB :</td>
</tr>
<tr>
    <td>type</td>
    <td>id=file</td>
    <td>C:\tmp\incoming\Top 100 Science Fiction and Fantasy Books as Voted by NPR-P2P(Epub, Mobi)\11. The Princess Bride by William Goldman\William Goldman - Princess Bride_ S. Morgenstern_The (v4.0).mobi</td>
</tr>
<tr>
    <td>click</td>
    <td>id=submit_button</td>
    <td></td>
</tr>
<tr>
    <td>waitForPopUp</td>
    <td>timeout</td>
    <td>60000</td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td></td>
    <td>&quot;OK&quot;</td>
</tr>

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

新测试
新测试
打开
/转换为epub
验证文本
css=h1
将文本转换为ePub电子书格式
验证文本
css=li标签
上载要转换为EPUB的文档:
类型
id=文件
C:\tmp\incoming\NPR-P2P(Epub,Mobi)投票选出的100本科幻和幻想书11。威廉·戈德曼的公主新娘\威廉·戈德曼-公主新娘(v4.0)。mobi
点击
id=提交按钮
等待弹出窗口
超时
60000
单击并等待
“好的”

对话框不是页面。无论它们是如何定义的@Quentin,浏览器都可以显示对话框,因此-它可以访问它们的HTML代码。因此,可以想象,应该有一种方法来查看这些代码。因为它们不是页面,所以它们没有HTML代码。对话框不是页面。无论它们是如何定义的@Quentin,浏览器都能够显示对话框,因此-它可以访问它们的HTML代码。因此,可以想象,应该有一种方法来查看代码,因为它们不是页面,所以没有HTML代码。