国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

自動化測試selenium

這篇具有很好參考價值的文章主要介紹了自動化測試selenium。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

自動化測試相關(guān)理論

什么是自動化測試

將人工的測試手段進(jìn)行轉(zhuǎn)換,讓代碼去執(zhí)行。

自動化分類:

  • 單元測試
  • 接口測試
  • UI自動化測試

selenium

selenium 是什么

selenium 是web應(yīng)用中基于UI的自動化測試框架。

selenium 特點

支持多平臺、多瀏覽器、多語言、有豐富的API

工作原理

自動化測試selenium

實操(selenium + Junit)

selenium + Java 環(huán)境搭建

public class Main {
    public static void main(String[] args) {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");  //允許所有請求
        WebDriver webDriver = new ChromeDriver(options);
        webDriver.get("https://www.baidu.com");  //打開百度首頁

        //找到百度搜索輸入框 通過CSS 選擇器查找定位元素
//        WebElement element = webDriver.findElement(By.cssSelector(".s_ipt"));

        //通過 xpath 查找定位元素
        WebElement element = webDriver.findElement(By.xpath("http://*[@id=\"kw\"]"));
        //輸入軟件測試
        element.sendKeys("軟件測試");
    }
}

selenium 常用api

定位元素

定位元素:findElement
通過CSS 選擇器查找定位元素By.cssSelector()

WebElement element = webDriver.findElement(By.cssSelector(".s_ipt"));

自動化測試selenium
通過 xpath 查找定位元素

WebElement element = webDriver.findElement(By.xpath("http://*[@id=\"kw\"]"));

自動化測試selenium

CSS選擇器語法

  • id選擇器:#id
  • 類選擇器:.class
  • 標(biāo)簽選擇器:標(biāo)簽名
  • 后代選擇器:父級選擇器 子級選擇器

xpath定位元素
絕對路徑:/html/head/title 【不常用】
相對路徑:雙斜杠開頭 //

  • 相對路徑 + 索引://form/span[1]/input
  • 相對路徑 + 屬性值://input[@class="s_ipt"]
  • 相對路徑 + 通配符://*[@*="su"]
  • 相對路徑 + 文本匹配://a[text()="新聞]"

CSS選擇器和xpath定位元素哪個更好?
CSS選擇器定位元素效率更高

常用的操作測試對象

  • click:點擊對象
  • sendKeys:在對象上模擬按鍵輸入
  • clear:清除對象輸入的文本內(nèi)容
  • submit:提交
    • 如果點擊的元素放在form標(biāo)簽中,此時使用submit實現(xiàn)的效果和click是一樣的
    • 如果點擊的元素放在非form標(biāo)簽中,此時使用submit會報錯
  • getText:用于獲取元素的文本信息.無法獲取元素對應(yīng)的屬性值,只能獲取文本內(nèi)容
  • getAttribute:可以獲取元素對應(yīng)的屬性值
click、sendKeys
 private static void test01() throws InterruptedException {
    ChromeOptions options = new ChromeOptions();
    options.addArguments("--remote-allow-origins=*");  //允許所有請求
    WebDriver webDriver = new ChromeDriver(options);
    webDriver.get("https://www.baidu.com");  //打開百度首頁

    //找到百度搜索輸入框 通過CSS 選擇器查找定位元素
//   WebElement element = webDriver.findElement(By.cssSelector(".s_ipt"));

    //通過 xpath 查找定位元素
    WebElement element = webDriver.findElement(By.xpath("http://*[@id=\"kw\"]"));

    //輸入軟件測試
    element.sendKeys("軟件測試");

    // 找到百度一下按鈕 點擊
    webDriver.findElement(By.cssSelector("#su")).click();
    sleep(3000);

    // 校驗
    // 找到搜索結(jié)果
    int flg = 0;
    List<WebElement> elements = webDriver.findElements(By.cssSelector("a em"));
    for (int i = 0; i < elements.size(); i++) {
//       System.out.println(elements.get(i).getText());
        //如果返回的結(jié)果有軟件測試,就證明測試通過,否則測試不通過
        if (elements.get(i).getText().contains("軟件測試")) {
            flg = 1;
            System.out.println("測試通過");
            break;
        }
    }
    if (flg == 0) {
        System.out.println("測試不通過");
    }
}
submit
//test03()會報錯,因為這里使用submit點擊了百度新聞的超鏈接,這個超鏈接沒有在form表單中,
private static void test03() {
    ChromeOptions options = new ChromeOptions();
    options.addArguments("--remote-allow-origins=*");
    WebDriver webDriver = new ChromeDriver(options);
    webDriver.get("https://www.baidu.com");
//    webDriver.findElement(By.xpath("http://a[text()=\"新聞\"]")).submit();
    webDriver.findElement(By.xpath("http://a[text()=\"新聞\"]")).click();
}
clear
//clear 清除對象輸入的文本按鈕
private static void test02() throws InterruptedException {
    ChromeOptions options = new ChromeOptions();
    options.addArguments("--remote-allow-origins=*");  //允許所有請求
    WebDriver webDriver = new ChromeDriver(options);
    webDriver.get("https://www.baidu.com");  //打開百度首頁
    //找到百度搜索輸入框,輸入Java
    webDriver.findElement(By.cssSelector("#kw")).sendKeys("java");
    //點擊了百度一下按鈕
    webDriver.findElement(By.cssSelector("#su")).click();
//   webDriver.findElement(By.cssSelector("#su")).submit();

    sleep(2000);
    // 清空百度搜索輸入框中的數(shù)據(jù)
    webDriver.findElement(By.cssSelector("#kw")).clear();

}
getText、getAttribute
private static void test04() {
    ChromeOptions options = new ChromeOptions();
    options.addArguments("--remote-allow-origins=*");
    WebDriver webDriver = new ChromeDriver(options);
    webDriver.get("https://www.baidu.com");
    //getText 無法獲取元素對應(yīng)的屬性值,只能獲取文本內(nèi)容
    //getAttribute 可以獲取元素對應(yīng)的屬性值
//        String buttomValue = webDriver.findElement(By.cssSelector("#su")).getText();
    String buttomValue = webDriver.findElement(By.cssSelector("#su")).getAttribute("value");
//        System.out.println(buttomValue);
    if (buttomValue.equals("百度一下")) {
        System.out.println("測試通過");;
    } else {
        System.out.println(buttomValue);
        System.out.println("測試不通過");
    }
}

等待

  • 強(qiáng)制等待:sleep()
  • 智能等待
    1. 隱式等待:webDriver.manage().timeouts().implicitlyWait(3, TimeUnit.DAYS);參數(shù)1是時間,參數(shù)2是單位
    2. 顯示等待:
WebDriverWait wait = new WebDriverWait(webDriver, 3000);
wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("#s-hotsearch-wrapper > div > a.hot-title > div > i:nth-child(1)")));

隱式等待:等待的是所有的元素
顯示等待:等待的是一定的條件(程序員自己設(shè)定的條件)

假設(shè)等待3天時間
強(qiáng)制等待:一直等待 等待的時間為3天
隱式等待:最長等待3天時間,如果在3天之內(nèi)獲取到頁面上的元素,此時執(zhí)行下面的代碼;
如果等待3天時間還是沒有找到這個元素,此時報錯

信息獲取

  • getTitle():打印標(biāo)題
  • getCurrentUrl():打印url
private static void test05() {
    ChromeOptions options = new ChromeOptions();
    options.addArguments("--remote-allow-origins=*");
    WebDriver webDriver = new ChromeDriver(options);
    webDriver.get("https://www.baidu.com");
    String url = webDriver.getCurrentUrl();
    String title = webDriver.getTitle();
    if (url.equals("https://www.baidu.com/") && title.equals("百度一下,你就知道")) {
        System.out.println("當(dāng)前頁面:" + url);
        System.out.println("當(dāng)前頁面title:" + title);
        System.out.println("測試通過");
    } else {
        System.out.println("測試不通過");
    }
}

瀏覽器操作

瀏覽器前進(jìn)后退
    private static void test07() throws InterruptedException {
        WebDriver webDriver = new ChromeDriver();
        //打開百度首頁
        webDriver.get("https://www.baidu.com");
        //搜索521
        webDriver.findElement(By.cssSelector("#kw")).sendKeys("521");
        webDriver.findElement(By.cssSelector("#su")).click();
        //強(qiáng)制等待3秒
        sleep(3000);

        //瀏覽器后退
        webDriver.navigate().back();   // 后退
        sleep(3000);
        //強(qiáng)制等待3秒
        webDriver.navigate().refresh();  //刷新
        //瀏覽器前進(jìn)
        sleep(3000);
        webDriver.navigate().forward();   // 前進(jìn)
    }
瀏覽器滾動條

瀏覽器滾動條的控制需要依靠js腳本

((JavascriptExecutor)webDriver).executeScript("document.documentElement.scrollTop=10000");
瀏覽器窗口大小
    private static void test07() throws InterruptedException {
        WebDriver webDriver = new ChromeDriver();
        //打開百度首頁
        webDriver.get("https://www.baidu.com");
        //搜索521
        webDriver.findElement(By.cssSelector("#kw")).sendKeys("521");
        webDriver.findElement(By.cssSelector("#su")).click();
        //強(qiáng)制等待3秒
        sleep(3000);
        ((JavascriptExecutor)webDriver).executeScript("document.documentElement.scrollTop=10000");
        sleep(3000);
        webDriver.manage().window().maximize();  //瀏覽器最大化
        sleep(3000);
        webDriver.manage().window().fullscreen();  //全屏
        sleep(3000);
        webDriver.manage().window().setSize(new Dimension(600, 1000));   //設(shè)置窗口大小
    }

鍵盤操作

//進(jìn)行 全選 剪切 粘貼
    private static void test08() throws InterruptedException {
        WebDriver webDriver = new ChromeDriver();
        //打開百度首頁
        webDriver.get("https://www.baidu.com/");
        //搜索521
        webDriver.findElement(By.cssSelector("#kw")).sendKeys("521");
        // ctrl + A
        webDriver.findElement(By.cssSelector("#kw")).sendKeys(Keys.CONTROL, "A");
        sleep(3000);
        // ctrl + X
        webDriver.findElement(By.cssSelector("#kw")).sendKeys(Keys.CONTROL, "X");
        sleep(3000);
        // ctrl + V
        webDriver.findElement(By.cssSelector("#kw")).sendKeys(Keys.CONTROL, "V");
        sleep(3000);


//        webDriver.findElement(By.cssSelector("#su")).click();


    }

鼠標(biāo)右擊

    private static void test09() throws InterruptedException {
        WebDriver webDriver = new ChromeDriver();
        webDriver.get("https://www.baidu.com");
        webDriver.findElement(By.cssSelector("#kw")).sendKeys("521");
        webDriver.findElement(By.cssSelector("#su")).click();
        sleep(3000);
        //找到圖片按鈕
        WebElement webElement = webDriver.findElement(By.cssSelector("#searchTag > div > div > a.c-color-t.c-line-clamp1.tags_2yHYj.tag-selected_1iG7R > span"));

        //鼠標(biāo)右擊
        Actions actions = new Actions(webDriver);
        sleep(3000);
        actions.moveToElement(webElement).contextClick().perform();
    }

定位一組元素

webdriver 可以很方便的使用findElement 方法來定位某個特定的對象,不過有時候我們卻需要定位一
組對象,這時候就需要使用findElements 方法。
定位一組對象一般用于以下場景:

  • 批量操作對象,比如將頁面上所有的checkbox 都勾上
  • 先獲取一組對象,再在這組對象中過濾出需要具體定位的一些對象。比如定位出頁面上所有的
    checkbox,然后選擇最后一個
//對應(yīng)test01.html
private static void page01() {
    WebDriver webDriver = new ChromeDriver();
    webDriver.get("http://localhost:63342/20230512TestCode/src/main/page/test01.html?_ijt=79ohoqao534c22adm6ri7dfaku&_ij_reload=RELOAD_ON_SAVE");
    webDriver.manage().timeouts().implicitlyWait(3, TimeUnit.DAYS);  //隱式等待
    List<WebElement> webElements = webDriver.findElements(By.cssSelector("input"));
    for (int i = 0; i < webElements.size(); i++) {
        // 如果每個元素的 type 值等于 checkbox ,進(jìn)行點擊
        // getAttribute 獲取頁面元素上的屬性值
        if (webElements.get(i).getAttribute("type").equals("checkbox")) {
            webElements.get(i).click();
        } else {
            //否則什么也不操作
        }
    }
}

多層窗口定位 (frame切換)

webDriver.switchTo().frame("f1");獲取frame中的元素

    // 多層窗口定位
    private static void page02() {
        WebDriver webDriver = new ChromeDriver();
        webDriver.get("http://localhost:63342/20230512TestCode/src/main/page/test02.html?_ijt=rss48aadnhjt4mgv70r81np9u5&_ij_reload=RELOAD_ON_SAVE");
        webDriver.switchTo().frame("f1");  //定位一個frame 值是frame的id
        webDriver.findElement(By.cssSelector("body > div > div > a")).click();
    }

下拉框

    //下拉框
    private static void page03() throws InterruptedException {
        WebDriver webDriver = new ChromeDriver();
        webDriver.get("http://localhost:63342/20230512TestCode/src/main/page/test03.html?_ijt=u5qdt3mv62m6hpml2pun3pkni4&_ij_reload=RELOAD_ON_SAVE");
        WebElement webElement = webDriver.findElement(By.cssSelector("#ShippingMethod"));
        Select select = new Select(webElement);
//        select.selectByIndex(1);  // 通過下標(biāo)選擇
//        sleep(3000);
        select.selectByValue("3.20");  // 通過value值選擇
    }

對alert操作

    // 針對alert操作
    private static void page04() throws InterruptedException {
        WebDriver webDriver = new ChromeDriver();
        webDriver.get("http://localhost:63342/20230512TestCode/src/main/page/test04.html?_ijt=puu6ngd14ds8dnofliuvvs3360&_ij_reload=RELOAD_ON_SAVE");
        webDriver.findElement(By.cssSelector("button")).click();
        sleep(3000);
        //alert 彈窗取消
        webDriver.switchTo().alert().dismiss();
        sleep(3000);

        //點擊按鈕
        webDriver.findElement(By.cssSelector("button")).click();
        //在alert彈窗中輸入
        webDriver.switchTo().alert().sendKeys("sss");
        sleep(3000);
        //alert彈窗確認(rèn)
        webDriver.switchTo().alert().accept();
    }

文件上傳

//文件上傳
private static void page05() throws InterruptedException {
    WebDriver webDriver = new ChromeDriver();
    webDriver.get("http://localhost:63342/20230512TestCode/src/main/page/test05.html?_ijt=ole7f30h4kb7q9vgs1pmb1k6j0&_ij_reload=RELOAD_ON_SAVE");
    sleep(3000);
    webDriver.findElement(By.cssSelector("input")).sendKeys("D://log.txt");  //文件路徑
}

關(guān)閉瀏覽器

關(guān)閉瀏覽器quit和close的區(qū)別:

  • quit關(guān)閉了整個瀏覽器,close只關(guān)閉了當(dāng)前的頁面
  • quit會清空緩存;close不會清空緩存
    private static void test10() throws InterruptedException {
        WebDriver webDriver = new ChromeDriver();
        webDriver.get("https://www.baidu.com/");
        webDriver.findElement(By.cssSelector("#s-top-left > a:nth-child(1)"));
        sleep(4000);
        webDriver.quit();
//        webDriver.close();
    }

切換窗口

    //切換窗口
    private static void test11() throws InterruptedException {
        WebDriver webDriver = new ChromeDriver();
        webDriver.get("https://www.baidu.com/");
        //點擊跳轉(zhuǎn)到新界面
        webDriver.findElement(By.cssSelector("#s-top-left > a:nth-child(1)")).click();

        sleep(3000);

        // 通過 getWindowHandles 獲取所有的窗口句柄
        // 通過 getWindowHandle 獲取的get打開的頁面窗口句柄
//        System.out.println(webDriver.getWindowHandle());
        Set<String> handles = webDriver.getWindowHandles();
        String target_handle = "";
        for (String handle : handles) {
            target_handle = handle;   //拿到handles的最后一個元素
        }
        webDriver.switchTo().window(target_handle);  //

        //在新的界面輸入框輸入
        //之所以找不到元素,是因為元素默認(rèn)是在get打開的這個頁面找元素,需要對頁面進(jìn)行切換
        webDriver.findElement(By.cssSelector("#ww")).sendKeys("新聞聯(lián)播");
        webDriver.findElement(By.cssSelector("#s_btn_wr")).click();  //點擊搜索
    }

截圖

添加maven依賴 commons-io

<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
    <groupId>commons-io</groupId>
    <artifactId>commons-io</artifactId>
    <version>2.11.0</version>
</dependency>
    //截圖
    private static void test12() throws InterruptedException, IOException {
        WebDriver webDriver = new ChromeDriver();
        webDriver.get("https://www.baidu.com/");
        webDriver.findElement(By.cssSelector("#kw")).sendKeys("軟件測試");
        webDriver.findElement(By.cssSelector("#su")).click();

        sleep(3000);
        File file = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.FILE);
        FileUtils.copyFile(file, new File("D://20230521.png"));
    }

QUESTION

在自動化測試的時候,驗證碼無法獲取,如何操作?
可以在自動化測試賬號加一個白名單,設(shè)置該賬號登陸的時候不需要驗證碼驗證文章來源地址http://www.zghlxwxcb.cn/news/detail-470439.html

到了這里,關(guān)于自動化測試selenium的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • 【自動化測試】Java+Selenium自動化測試環(huán)境搭建

    【自動化測試】Java+Selenium自動化測試環(huán)境搭建

    本主要介紹以Java為基礎(chǔ),搭建Selenium自動化測試環(huán)境,并且實現(xiàn)代碼編寫的過程。 1.Selenium介紹 Selenium 1.0 包含 core、IDE、RC、grid 四部分,selenium 2.0 則是在兩位大牛偶遇相互溝通決定把面向?qū)ο蠼Y(jié)構(gòu)化(OOPP)和便于編寫代碼的各自思想予以整合后形成的新工具,也就是我們所

    2024年02月11日
    瀏覽(21)
  • JavaScript+Selenium自動化測試_selenium和js能一起做自動化測試

    JavaScript+Selenium自動化測試_selenium和js能一起做自動化測試

    var webdriver = require(‘selenium-webdriver’), By = webdriver.By, until = webdriver.until; var driver = new webdriver.Builder() .forBrowser(‘chrome’) .build(); driver.get(‘https://www.baidu.com’); driver.findElement(By.id(‘kw’)).sendKeys(‘webdriver’); driver.findElement(By.id(‘su’)).click(); driver.wait(until.titleIs(‘webdriver_百度

    2024年04月25日
    瀏覽(25)
  • 自動化測試介紹、selenium用法(自動化測試框架+爬蟲可用)

    自動化測試介紹、selenium用法(自動化測試框架+爬蟲可用)

    1、什么是自動化測試? 程序測試程序、代碼代替思維、腳本代替人工 核心:質(zhì)量和效率 作用:降低成本、節(jié)省人力時間、推動CI和DevOps、準(zhǔn)確性和可靠性、模擬人工難以實現(xiàn)的手段、快速持續(xù)迭代發(fā)布能力、衡量產(chǎn)品的質(zhì)量、提升測試效率、提高測試覆蓋率 2、手工測試

    2024年03月08日
    瀏覽(39)
  • 自動化測試之web自動化(Selenium)

    自動化測試之web自動化(Selenium)

    ??? 交流討論: 歡迎加入我們一起學(xué)習(xí)! ?? 資源分享 : 耗時200+小時精選的「軟件測試」資料包 ??? 教程推薦: 火遍全網(wǎng)的《軟件測試》教程?? ?? 歡迎點贊 ?? 收藏 ?留言 ?? 如有錯誤敬請指正! yycnblog 自動化測試概念:讓程序代替人為去驗證程序功能的過程,本

    2024年03月15日
    瀏覽(46)
  • 測開 - 自動化測試 selenium - 自動化概念 && 測試環(huán)境配置 - 細(xì)節(jié)狂魔

    測開 - 自動化測試 selenium - 自動化概念 && 測試環(huán)境配置 - 細(xì)節(jié)狂魔

    自動化測試指 軟件測試的自動化 ,在 預(yù)設(shè)狀態(tài)下 運行應(yīng)用程序或者系統(tǒng). 預(yù)設(shè)條件 包括正常和異常 ,最后評估運行結(jié)果。 ? 自動化測試,就是 將人為驅(qū)動的測試行為轉(zhuǎn)化為機(jī)器執(zhí)行的過程。 【機(jī)器 代替 人工】 自動化測試 包括UI自動化,接口自動化,單元測試自動化。

    2024年02月02日
    瀏覽(35)
  • Selenium+python怎么搭建自動化測試框架、執(zhí)行自動化測試用例、生成自動化測試報告、發(fā)送測試報告郵件

    Selenium+python怎么搭建自動化測試框架、執(zhí)行自動化測試用例、生成自動化測試報告、發(fā)送測試報告郵件

    本人在網(wǎng)上查找了很多做自動化的教程和實例,偶然的一個機(jī)會接觸到了selenium,覺得非常好用。后來就在網(wǎng)上查閱各種selenium的教程,但是網(wǎng)上的東西真的是太多了,以至于很多東西參考完后無法系統(tǒng)的學(xué)習(xí)和應(yīng)用。 以下整理的只是書中自動化項目的知識內(nèi)容,介紹怎么搭

    2024年02月05日
    瀏覽(30)
  • 自動化測試:5分鐘了解Selenium以及如何提升自動化測試的效果

    自動化測試:5分鐘了解Selenium以及如何提升自動化測試的效果

    在快節(jié)奏的技術(shù)世界里,自動化測試已經(jīng)成為確保?Web?應(yīng)用程序質(zhì)量和性能的重要手段。自動化測試不僅加快了測試過程,還提高了測試的重復(fù)性和準(zhǔn)確性。Selenium,作為領(lǐng)先的自動化測試工具之一,為測試人員提供了強(qiáng)大的功能來模擬用戶在?Web?瀏覽器中的行為。在本文中

    2024年01月20日
    瀏覽(29)
  • 【軟件測試/自動化測試】WebDriver+Selenium實現(xiàn)瀏覽器自動化

    【軟件測試/自動化測試】WebDriver+Selenium實現(xiàn)瀏覽器自動化

    前言 使用場景 原理 環(huán)境準(zhǔn)備 ?開發(fā) First Script WebDriver API 瀏覽器 元素 總結(jié) Selenium是一款可以自動化操作瀏覽器的開源項目,最初的目的是瀏覽器功能的自動化測試,但是隨著項目的發(fā)展,人們根據(jù)它的特性也用來做一些更多的有意思的功能而不僅僅是UI的自動化測試工具。

    2024年02月08日
    瀏覽(64)
  • 自動化測試- selenium

    自動化測試- selenium

    1. 在瀏覽器中安裝擴(kuò)展 ? 2. 運行代碼時候,報錯 selenium.common.exceptions.WebDriverException: Message: \\\'chromedriver\\\' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home? 此時下載?chromedriver:CNPM Binaries Mirror 記得要與 Google瀏覽器版本適配。 關(guān)于環(huán)境配置參考此鏈接(win轉(zhuǎn)mac不

    2023年04月08日
    瀏覽(19)
  • 自動化測試selenium

    自動化測試selenium

    將人工的測試手段進(jìn)行轉(zhuǎn)換,讓代碼去執(zhí)行。 自動化分類: 單元測試 接口測試 UI自動化測試 selenium 是什么 selenium 是web應(yīng)用中基于UI的自動化測試框架。 selenium 特點 支持多平臺、多瀏覽器、多語言、有豐富的API 工作原理 定位元素 定位元素: findElement 通過CSS 選擇器查找定

    2024年02月07日
    瀏覽(26)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包