简体   繁体   English

通过弹出窗口浏览?

[英]Browse through a pop-up?

I want to test the links that appear in a pop up in a website after pressing a button.我想测试按下按钮后出现在网站弹出窗口中的链接。 The problem is that I dont know how to do it.问题是我不知道该怎么做。 I dont know the name of any buttons of the popup, and even dont know if the watin can navegate through it.我不知道弹出窗口的任何按钮的名称,甚至不知道 watin 是否可以通过它导航。

I used to check links in a website searching the button by the name (using development tool from IE to search the name of the buttons), but with the pop up I dont know.我曾经检查网站中的链接,通过名称搜索按钮(使用 IE 中的开发工具搜索按钮的名称),但弹出我不知道。

How can i do it?我该怎么做? There is a function to work with pop ups?有一个 function 可以使用弹出窗口吗? How can I get the name of the elements of the pop up?如何获取弹出窗口元素的名称?

All website pages are html, javascript and css - all human readable.所有网站页面均为 html、javascript 和 css - 都是人类可读的。

Try viewing the source.尝试查看源代码。

ps They are readable unless they are Flash type applications. ps 它们是可读的,除非它们是 Flash 类型的应用程序。

Install the Web Developer extension for Firefox, right-click on the element, choose Inspect Element.安装 Firefox 的 Web Developer 扩展,右键单击元素,选择检查元素。

You have to attach to that popup.您必须附加到该弹出窗口。 Treat it like a normal IE window.像普通的 IE window 一样对待它。 I don't remember correctly, but try something like that:我不记得正确,但尝试这样的事情:

var popup = IE.AttachTo<IE>(Find.ByTitle("Title of the popup"));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM