package org.phoenix.cases;import java.util.linkedlist;import org.phoenix.action.webelementactionproxy;import org.phoenix.enums.locatortype;import Org.phoenix.model.caselogbean;import org.phoenix.model.unitlogbean;/** * div form of pop-up box processing, such as login * @author mengfeiyang * */public class TestPhoenixCaseDiv extends webelementactionproxy{@Overridepublic linkedlist<unitlogbean> run (caselogbean arg0) {init ("", arg0);//webproxy.setfirefoxexepath ("d:\\program files (x86) \\mozilla firefox\\ Firefox.exe ");//webproxy.opennewwindowbyfirefox (" http://1.163.com "); Webproxy.opennewwindowbyie (" http://1.163. com "), if (Webproxy.webelement (". W-msgbox-close ", locatortype.css). Exists ()) webproxy.webelement (". W-msgbox-close ", locatortype.css). Click (); webproxy.webelement (" Please login ", locatortype.linktext). Click (); /The following 3 steps will be error when executing in Firefox browser. But in IE no problem webproxy.webelementlinkfinder ("#pro-view-18", null). $ (". W-input-input"). SetValue ("username"); Webproxy.webelementlinkfinder ("#pro-view-20", Locatortype.css). $ (". W-input-input "). SendKeys (" password "); Webproxy.webelementlinkfinder (" #pro-view-16 ", null). Findelementbytagname (" Button "). Click (); Webproxy.closewindow (); Return getunitlog ();} Public static void main (String[] args) {testphoenixcasediv t = new testphoenixcasediv (); Linkedlist<unitlogbean> ll = t.run (New caselogbean ()); for (UnitLogBean l : &NBSP;LL) {System.out.println (l.getcontent ());}}}
Phoenixframe Automation test Platform for Div popup (such as popup div landing box) processing