ui自动化执行接口
This commit is contained in:
@@ -855,4 +855,16 @@ public class SeleniumUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 在新标签页打开URL
|
||||
* @param url 要打开的网址
|
||||
*/
|
||||
public void openUrlInNewTab(String url) {
|
||||
// 打开新标签页
|
||||
driver.switchTo().newWindow(WindowType.TAB);
|
||||
|
||||
// 导航到目标URL
|
||||
driver.get(url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user