添加Elemen类,准备分离元素类
This commit is contained in:
parent
15575ba510
commit
cee97da36e
|
@ -21,7 +21,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||
* @since JDK 12
|
||||
*
|
||||
*/
|
||||
public abstract class AbstractBrower {
|
||||
public abstract class Brower {
|
||||
/**
|
||||
* 用于接收浏览器启动所需的文件路径
|
||||
*/
|
||||
|
@ -50,7 +50,7 @@ public abstract class AbstractBrower {
|
|||
*
|
||||
* @param driberFile 驱动文件对象
|
||||
*/
|
||||
public AbstractBrower(File driverFile) {
|
||||
public Brower(File driverFile) {
|
||||
this.driverFile = driverFile;
|
||||
|
||||
// 存储页面信息
|
||||
|
@ -64,7 +64,7 @@ public abstract class AbstractBrower {
|
|||
* @param url 待测站点
|
||||
* @param pageName 待测站点名称,用于切换页面
|
||||
*/
|
||||
public AbstractBrower(File driverFile, String url, String pageName) {
|
||||
public Brower(File driverFile, String url, String pageName) {
|
||||
this(driverFile);
|
||||
nowPage = new Page(url, pageName);
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public abstract class AbstractBrower {
|
|||
* @param driverFile 驱动文件对象
|
||||
* @param page {@link Page}类对象
|
||||
*/
|
||||
public AbstractBrower(File driverFile, Page page) {
|
||||
public Brower(File driverFile, Page page) {
|
||||
this(driverFile);
|
||||
nowPage = page;
|
||||
}
|
|
@ -40,7 +40,7 @@ import com.alibaba.fastjson.JSONArray;
|
|||
* @since JDK 1.8
|
||||
*
|
||||
*/
|
||||
public class ChromeBrower extends AbstractBrower {
|
||||
public class ChromeBrower extends Brower {
|
||||
/**
|
||||
* 用于存储需要对浏览器进行配置的参数
|
||||
*/
|
||||
|
|
|
@ -137,7 +137,7 @@ public class Page {
|
|||
/**
|
||||
* 用于通过浏览器加载页面,并根据页面断言,返回页面是否加载成功。若未设置断言,则无论
|
||||
* 页面是否成功加载,均返回true
|
||||
* @param driver WebDriver对象,通过可通过{@link AbstractBrower}类及其子类来生成
|
||||
* @param driver WebDriver对象,通过可通过{@link Brower}类及其子类来生成
|
||||
* @return 根据页面断言返回页面是否加载成功
|
||||
*/
|
||||
public boolean loadPage(WebDriver driver) {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
package pres.auxiliary.work.selenium.element;
|
||||
|
||||
public class Element {
|
||||
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue