当我点击页面上的标签时,我有一个加载的iframe.当我使用Firebug查看IE8上的iframe时,我看到的只有:
iframe id=tabContextFrame class=contextFrame contentEditable=inherit src=/xyz.dt?forward=show&layouttype=NoHeader&runid=1234 name=tabContextFrame url=/xyz.dt?forward=show&layouttype=NoHeader&runid=1234 scrolling=auto
就是这样.在iframe下面的层次结构是看不到的.我想点击iframe中的链接.为了找到iframe中的元素,我做了一个selenium.click("on the tab that loads the iframe")然后selenium.getHtmlSource().从这个来源,我至少可以找到我感兴趣的链接.我做了一个,selenium.click("//span[text()='Link']")但似乎没有做任何事情.有什么想法吗?
这是代码:
selenium.click("//span[text()='tab that loads iframe']");
Thread.sleep(5000);
selenium.selectFrame("tabContextFrame");
selenium.mouseOver("//span[text()='Link']");
selenium.mouseDown("//span[text()='Link']");
selenium.mouseUp("//span[text()='Link']");
Thread.sleep(5000);
selenium.selectFrame("null");
Run Code Online (Sandbox Code Playgroud) 我已经安装了Tomcat插件,并且如果我创建一个New Dynamic Web Project,并将其导入现有的基本Maven Web应用程序,它将可以正常工作。我可以选择“作为服务器”运行它。
但是,当我在Eclipse中导入现有基本maven应用程序的现有项目时,我必须右键单击该项目,选择“配置”并将其转换为Faceted项目,然后右键单击该项目,选择“属性”。 ,然后选择目标运行时,然后选择Tomcat和JRE。但是,我仍然无法“作为服务器”运行项目。当我单击“运行”时,我只看到Java Applet,Java Application和JUnit Test作为运行项目的选项。我没有看到服务器。
我只希望第一个和第三个ID为红色.那可能吗?
#sections div[id^='s.*0'] {
color: red;
} Run Code Online (Sandbox Code Playgroud)
<div id="sections">
<div id="s10">one</div>
<div id="s2">two</div>
<div id="s30">three</div>
<div id="t1">four</div>
</div>Run Code Online (Sandbox Code Playgroud)