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

python+selenium自動(dòng)化測(cè)試關(guān)鍵字驅(qū)動(dòng)

這篇具有很好參考價(jià)值的文章主要介紹了python+selenium自動(dòng)化測(cè)試關(guān)鍵字驅(qū)動(dòng)。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

一、selenium常用方法封裝(baseselenium.py)

from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
import os
from Common.log_utils import LogUtils
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
from selenium import webdriver
import pyperclip
import allure
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By

class driver():
    # 調(diào)用瀏覽器,可以考慮寫(xiě)到conftest.py
    def open_browser(self, browser_type):
        options = webdriver.ChromeOptions()
        options.add_experimental_option('excludeSwitches', ['enable-automation'])
        if browser_type == 'chrome':
            driver = webdriver.Chrome(options=options)
            return driver
        elif browser_type == 'firefox':
            driver = webdriver.firefox()
        else:
            print('type error')

class BaseSelenium(object):
    def __init__(self, driver):
        """WebDriver需以參數(shù)的形式傳入,否則運(yùn)行時(shí)會(huì)導(dǎo)致多個(gè)瀏覽器窗口被打開(kāi)"""
        self.driver = driver
        """log類(lèi)實(shí)例化"""
        self.log = LogUtils()


    # 調(diào)用瀏覽器
    def open_browser(self, browser_type):
        options = webdriver.ChromeOptions()
        options.add_experimental_option('excludeSwitches', ['enable-automation'])
        if browser_type == 'chrome':
            driver = webdriver.Chrome(options=options)
            return driver
        elif browser_type == 'firefox':
            driver = webdriver.firefox()
        else:
            print('type error')

    #關(guān)閉瀏覽器
    def quit(self):
        self.driver.quit()

    "傳入U(xiǎn)RL,最大化窗口"
    def open_url(self, url):
        self.driver.maximize_window()
        self.url = "https://%s" % url
        self.driver.get(self.url)

    "獲取title"
    def get_title(self):
        self.log.info("獲取頁(yè)面title")
        try:
            self.log.info("當(dāng)前頁(yè)面title為:{}".format(self.driver.title))
            return self.driver.title
        except Exception as e:
            self.log.error("獲取頁(yè)面title失敗{}".format(e))
            self.screenshot_save()

    "獲取頁(yè)面元素"

    def get_element(self, *args):
        sleep_time = 10
        frequency = 0.5
        if args is not None:
            try:
                # 顯式等待,等待元素可見(jiàn)
                element = WebDriverWait(self.driver, sleep_time, frequency).until(
                    EC.visibility_of_element_located(*args)
                )
            except Exception as e:
                self.log.error("查找元素{}失?。簕}".format(args, e))
            else:
                return element
        else:
            self.log.error("element value is NUll")

    def get_elements(self, *args):
        sleep_time = 10
        frequency = 0.5
        if args is not None:
            try:
                # 顯式等待,等待元素可見(jiàn)
                elements = WebDriverWait(self.driver, sleep_time, frequency).until(
                    EC.visibility_of_all_elements_located(*args)
                )
            except Exception as e:
                self.screenshot_save()
                self.log.error("查找元素{}失?。簕}".format(args, e))
            else:
                return elements
        else:
            self.log.error("element value is NUll")

    "獲取頁(yè)面元素"

    def get_element_presence(self, *args):
        sleep_time = 10
        frequency = 0.5
        if args != None:
            try:
                # 顯式等待,等待元素存在
                element = WebDriverWait(self.driver, sleep_time, frequency).until(
                    EC.presence_of_element_located(*args)
                )
            except Exception as e:
                self.screenshot_save()
                self.log.error("查找元素{}失?。簕}".format(*args, e))
            else:
                return element
        else:
            self.log.error("element value is NUll")

    "等待元素可點(diǎn)擊"

    def element_clickable(self, *args):
        sleep_time = 10
        frequency = 0.5
        if args != None:
            try:
                # 顯式等待,等待元素可點(diǎn)擊
                element = WebDriverWait(self.driver, sleep_time, frequency).until(
                    EC.element_to_be_clickable(*args)
                )
                if element:
                    return element
                else:
                    self.screenshot_save()
            except Exception as e:
                self.screenshot_save()
                self.log.error("查找元素{}失?。簕}".format(args, e))
        else:
            self.log.error("element value is NUll")

    def click_clickable(self, name=None, *args):
        try:
            element = self.get_element(*args)
            print(element)
            element.click()
        except Exception as e:
            self.screenshot_save()
            self.log.error("{}元素[{}]點(diǎn)擊失敗".format(name, e))
        else:
            self.log.info("點(diǎn)擊{},元素[{}]點(diǎn)擊成功".format(name, *args))

    "模擬鍵盤(pán)輸入方法重寫(xiě)"
    def send_key(self, value, *args):
        if args is not None:
            if value is not None and value != 'None':
                try:
                    element = self.get_element(*args)
                    element.send_keys(str(value))
                    self.log.info("輸入值:{}".format(value))
                except:
                    try:
                        element = self.get_element_presence(*args)
                        element.send_keys(str(value))
                        self.log.info("二次嘗試輸入值:{}".format(value))
                    except Exception as e:
                        self.log.error("輸入錯(cuò)誤:{}{}".format(value, e))
                        self.screenshot_save()
            else:
                self.log.warning("沒(méi)有傳入字符串,或輸入為空")
        else:
            self.log.error("沒(méi)有傳入元素")

    "重寫(xiě)清空輸入框方法"

    def clear_value(self, *args):
        if args is not None:
            try:
                element = self.get_element(*args)
                element.clear()
                self.log.info("清除輸入框{}成功".format(*args))
            except Exception as e:
                self.log.error("清除輸入框{}失敗".format(e))
                self.screenshot_save()
        else:
            self.log.error("沒(méi)有傳入元素")

    "重寫(xiě)模擬鼠標(biāo)懸停方法"

    def mouse_move(self, *args):
        try:
            action = self.get_element_presence(*args)
            ActionChains(self.driver).move_to_element(action).perform()
            self.log.info("鼠標(biāo)移動(dòng)到元素{}成功".format(*args))
        except Exception as e:
            self.log.error("鼠標(biāo)移動(dòng)至元素:{}失敗".format(e))
            self.screenshot_save()

    def double_click(self, name, *args):
        if args:
            try:
                ele = self.get_element(*args)
                ActionChains(self.driver).double_click(ele).perform()
                self.log.info("雙擊{}成功".format(name))
            except Exception as e:
                self.log.error('雙擊元素{}失敗{}:'.format(args, e))
                self.screenshot_save()
        else:
            self.log.error('傳入元素為空')

    "重寫(xiě)表單提交方法"

    def text_submit(self, *args):
        try:
            ele = self.get_element(*args)
            ele.submit()
            self.log.info("表單{}提交成功".format(*args))
        except Exception as e:
            self.log.error("表單{}提交失敗".format(e))
            self.screenshot_save()

    "重寫(xiě)頁(yè)面文字獲取方法"

    def get_text(self, *args):
        try:
            text = self.get_element(*args).text
            self.log.info("獲取文字 {} 成功".format(text))
            return text
        except Exception as e:
            self.log.error("獲取文字失??!{},嘗試二次獲取".format(e))
            try:
                text = self.get_element_presence(*args).text
                self.log.info("獲取文字 {} 成功".format(text))
                return text
            except Exception as e:
                self.log.error("二次獲取文字失??!{}".format(e))
                self.screenshot_save()

    "多元素文字匹配"

    def get_texts(self, *args):
        text = []
        try:
            for ele in self.get_elements(*args):
                text.append(ele.text)
        except Exception as e:
            self.log.error("獲取文字失敗!{}".format(e))
            self.screenshot_save()
        else:
            self.log.info("獲取文字 {} 成功".format(text))
            return text

    "重寫(xiě)頁(yè)面截圖方法"
    def screenshot_save(self, name=None):
        p = os.path.abspath(os.path.dirname(os.getcwd()) + os.path.sep )   #xxx路徑
        path=p+r'\xxx\Outputs\logs'
        # print(path)
        if name:
            try:
                file_path = os.path.join(path, name +
                                         time.strftime("%Y.%m.%d-%H-%M-%S") + '.png')
                self.driver.save_screenshot(file_path)
                allure.attach(file_path, name, allure.attachment_type.PNG)
                self.log.info("頁(yè)面[{}]截圖成功".format(self.get_url()))
            except Exception as e:
                self.log.error("截圖失敗{}".format(e))
        else:
            try:
                file_path = os.path.join(path,
                                         time.strftime("%Y.%m.%d-%H-%M-%S") + '.png')
                self.driver.save_screenshot(file_path)
                self.log.info("頁(yè)面[{}]截圖成功".format(self.get_url()))
            except Exception as e:
                self.log.error("截圖失敗{}".format(e))

    "重寫(xiě)獲取當(dāng)前頁(yè)面URL方法"

    def get_url(self):
        url = self.driver.current_url
        if url:
            try:
                self.log.info("獲取URL[{}]成功".format(url))
                return url
            except Exception as e:
                self.log.error("獲取URL失敗{}".format(e))
        else:
            self.log.error("獲取url失敗")

    "重寫(xiě)點(diǎn)擊元素方法"

    def click_element(self, name=None, *args):
        try:
            element = self.get_element(*args)
            element.click()
            self.log.info("點(diǎn)擊{},元素[{}]點(diǎn)擊成功".format(name, *args))
        except Exception as e:
            self.log.error("{}元素[{}]第一次點(diǎn)擊失敗".format(name, e))
            try:
                self.log.info('切換到元素存在')
                self.element_presence_click(name, *args)
            except Exception as e:
                self.log.error("{}元素[{}]第二次點(diǎn)擊失敗".format(name, e))
                self.screenshot_save()
                try:
                    self.log.info('切換到j(luò)s點(diǎn)擊')
                    self.js_click(name, *args)
                except Exception as e:
                    self.log.error("{}元素[{}]第三次點(diǎn)擊失敗".format(name, e))
                    self.screenshot_save()

    # 獲取元素值
    def get_attribute(self, name, *args):
        try:
            attribute = self.get_element(*args).get_attribute(name)
            if attribute:
                self.log.info("獲取元素{}成功:{}".format(name, attribute))
                return attribute
        except Exception as e:
            self.log.warning(e)
            self.screenshot_save(name)

    # 模擬回車(chē)方法
    def keys_enter(self, *args):
        try:
            ele = self.get_element(*args)
            ele.send_keys(Keys.ENTER)
            self.log.info("元素{}回車(chē)成功".format(args))
        except Exception as e:
            self.log.error("模擬回車(chē)失敗,原因:{}".format(e))
            self.screenshot_save()

    # 模擬輸入框全選刪除
    def keys_delete(self, *args):
        try:
            ele = self.get_element(*args)
            ele.send_keys(Keys.CONTROL + "a")
            ele.send_keys(Keys.BACKSPACE)
        except Exception as e:
            self.log.error("刪除失敗{}".format(e))
            self.screenshot_save()

    # 獲取剪切板信息
    def get_paste(self, *args):
        try:
            ele = self.get_element(*args)
            ele.send_keys(Keys.CONTROL + "a")
            ele.send_keys(Keys.CONTROL + "c")
            vls = pyperclip.paste()
            self.log.info("獲取剪切板信息成功:{}".format(vls))
            return vls
        except Exception as e:
            self.log.error("獲取剪切板失敗:{}".format(e))

    # 刪除html屬性
    def remove_art(self, js_path, art_name):
        js = '{}.removeAttribute("{}");'.format(js_path, art_name)
        try:
            self.driver.execute_script(js)
            self.log.info('運(yùn)行刪除{}屬性js腳本成功'.format(art_name))
        except Exception as e:
            self.log.error('運(yùn)行刪除#{}#js腳本失敗{}'.format(art_name, e))

    # 通過(guò)js點(diǎn)擊
    def js_click(self, name, *args):
        element = self.get_element(*args)
        try:
            self.driver.execute_script("arguments[0].click();", element)
            self.log.info('點(diǎn)擊{}成功'.format(name))
        except Exception as e:
            self.log.error('通過(guò)js點(diǎn)擊{}元素{}失敗'.format(name, e))

    def js_get_text(self, *args):
        element = self.get_element_presence(*args)
        try:
            res = self.driver.execute_script("arguments[0].getInnerHTML();", element)
            self.log.info('獲取{}成功'.format(res))
        except Exception as e:
            self.log.error('通過(guò)js獲取{}元素{}失敗'.format(*args, e))
        else:
            return res

    # 使用selenium默認(rèn)的點(diǎn)擊
    def default_click(self, name, args):
        try:
            element = self.driver.find_element(*args)
            element.click()
        except Exception as e:
            self.log.error('元素{}點(diǎn)擊失敗:{}'.format(*args, e))
        else:
            self.log.info('不加任何等待,直接點(diǎn)擊:{}'.format(name))

    # 等待元素存在時(shí)點(diǎn)擊
    def element_presence_click(self, name, *args):
        try:
            element = self.get_element_presence(*args)
            element.click()
        except Exception as e:
            self.log.error("點(diǎn)擊{}元素[{}]點(diǎn)擊失敗".format(name, e))
        else:
            self.log.info("點(diǎn)擊{},元素[{}]點(diǎn)擊成功".format(name, *args))

二、頁(yè)面層(調(diào)用基類(lèi)進(jìn)行頁(yè)面元素定位,頁(yè)面操作)

page1

######項(xiàng)目頁(yè)面
from PageObjects.BaseSelenium import BaseSelenium
from selenium.webdriver.common.by import By
class Tt(BaseSelenium):
    # def __init__(self,browser_type='chrome',url = 'www.baidu.com'):
    #     super(Tt, self).__init__(browser_type='chrome',url = 'www.baidu.com')
    def test_baidu(self,key):
        self.send_key(key, (By.ID, 'kw'))
        self.element_presence_click('點(diǎn)擊百度一下',(By.ID,'su'))

    def clear(self):
        self.clear_value((By.ID, 'kw'))


page2文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-507651.html

######項(xiàng)目頁(yè)面
from PageObjects.BaseSelenium import BaseSelenium
from selenium.webdriver.common.by import By
class Tt1(BaseSelenium):
    # def __init__(self,browser_type='chrome',url = 'www.baidu.com'):
    #     super(Tt1, self).__init__(browser_type='chrome',url = 'www.baidu.com')
    def test_baidu1(self):
        self.send_key('222', (By.ID, 'kw'))
        self.element_presence_click('點(diǎn)擊百度一下',(By.ID,'su'))

    def clear(self):
        self.clear_value((By.ID, 'kw'))

三、用例層(調(diào)用頁(yè)面層組合成用例)

from PageLocators.page import Tt
from PageLocators.page1 import Tt1
from PageObjects.BaseSelenium import driver
from selenium.webdriver.common.by import By
class Test_1():
    def setup_class(self):
        d=driver().open_browser('chrome')
        self.baidu = Tt(d)
        self.baidu1 = Tt1(d)
        self.baidu.open_url(url='www.baidu.com')

    def test1(self):
        self.baidu.test_baidu('LZP')
        time.sleep(2)
        self.baidu.clear_value((By.ID, 'kw'))

    def test2(self):
        self.baidu1.test_baidu1()
        time.sleep(2)
        self.baidu1.clear()

    def test3(self):
        self.baidu.test_baidu('LP')
        time.sleep(2)
        self.baidu.clear()

    def teardown_class(self):
        self.baidu.quit()
if __name__=='__main__':
    pytest.main(['-s','test.py','-W','ignore:Module already imported:pytest.PytestWarning'])

到了這里,關(guān)于python+selenium自動(dòng)化測(cè)試關(guān)鍵字驅(qū)動(dòng)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

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

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

相關(guān)文章

  • 【軟件測(cè)試】UI自動(dòng)化框架,數(shù)據(jù)驅(qū)動(dòng) vs 關(guān)鍵字驅(qū)動(dòng)怎么選

    【軟件測(cè)試】UI自動(dòng)化框架,數(shù)據(jù)驅(qū)動(dòng) vs 關(guān)鍵字驅(qū)動(dòng)怎么選

    讓我們先從分析一端自動(dòng)化測(cè)試案例的代碼開(kāi)始我們的旅程。以下是我之前寫(xiě)的一個(gè)自動(dòng)化測(cè)試的小Demo。這個(gè)Demo 基于Selenium與Java 。 自動(dòng)化測(cè)試小Demo 它要測(cè)試的東西其實(shí)是要看一下百度搜索能不能返回興業(yè)銀行的官網(wǎng)。我們分析一下這段代碼都包含些什么東西。 第一,這

    2024年02月13日
    瀏覽(29)
  • 數(shù)據(jù)驅(qū)動(dòng) vs 關(guān)鍵字驅(qū)動(dòng):對(duì)搭建UI自動(dòng)化測(cè)試框架的探索

    數(shù)據(jù)驅(qū)動(dòng) vs 關(guān)鍵字驅(qū)動(dòng):對(duì)搭建UI自動(dòng)化測(cè)試框架的探索

    UI自動(dòng)化測(cè)試用例剖析 讓我們先從分析一端自動(dòng)化測(cè)試案例的代碼開(kāi)始我們的旅程。以下是我之前寫(xiě)的一個(gè)自動(dòng)化測(cè)試的小Demo。這個(gè)Demo基于Selenium與Java。由于現(xiàn)在Selenium在自動(dòng)化測(cè)試的統(tǒng)治地位,并且隨著Selenium 4的即將發(fā)布,在未來(lái)很長(zhǎng)的一段時(shí)間里這種統(tǒng)治地位應(yīng)該還會(huì)

    2024年02月19日
    瀏覽(26)
  • 如何搭建關(guān)鍵字驅(qū)動(dòng)自動(dòng)化測(cè)試框架?這絕對(duì)是全網(wǎng)天花板的教程

    如何搭建關(guān)鍵字驅(qū)動(dòng)自動(dòng)化測(cè)試框架?這絕對(duì)是全網(wǎng)天花板的教程

    目錄 1. 驅(qū)動(dòng)自動(dòng)化測(cè)試介紹 2. 搭建驅(qū)動(dòng)自動(dòng)化測(cè)試框架 步驟1:選擇測(cè)試工具 步驟2:定義測(cè)試用例 步驟3:編寫(xiě)測(cè)試驅(qū)動(dòng)引擎 步驟4:實(shí)現(xiàn)測(cè)試庫(kù) 步驟5:執(zhí)行測(cè)試 3. 實(shí)現(xiàn)驅(qū)動(dòng)自動(dòng)化測(cè)試的關(guān)鍵技術(shù) 技術(shù)1:測(cè)試工具 技術(shù)2:測(cè)試驅(qū)動(dòng)引擎的編寫(xiě) 技

    2023年04月20日
    瀏覽(23)
  • Python UI自動(dòng)化 —— 關(guān)鍵字+excel表格數(shù)據(jù)驅(qū)動(dòng)

    Python UI自動(dòng)化 —— 關(guān)鍵字+excel表格數(shù)據(jù)驅(qū)動(dòng)

    1. 對(duì)selenium進(jìn)行二次封裝,創(chuàng)建的庫(kù) 2. 準(zhǔn)備一個(gè)表格文件來(lái)寫(xiě)入所有測(cè)試用例步驟 3. 對(duì)表格內(nèi)容進(jìn)行讀取,使用映射關(guān)系來(lái)對(duì)用例進(jìn)行調(diào)用執(zhí)行 ? ? 4. 執(zhí)行用例 1. 對(duì)selenium進(jìn)行二次封裝,創(chuàng)建的庫(kù) 2. 創(chuàng)建一個(gè)表格,寫(xiě)入測(cè)試步驟 將表格放入項(xiàng)目任意路徑下,記

    2024年02月09日
    瀏覽(21)
  • UI自動(dòng)化之關(guān)鍵字驅(qū)動(dòng)

    UI自動(dòng)化之關(guān)鍵字驅(qū)動(dòng)

    驅(qū)動(dòng)框架:將每一條測(cè)試用例分成四個(gè)不同的部分 測(cè)試步驟(Test Step):一個(gè)測(cè)試步驟的描述或者是測(cè)試對(duì)象的一個(gè)操作說(shuō)明 測(cè)試步驟中的對(duì)象(Test Object):指頁(yè)面的對(duì)象或者元素 對(duì)象執(zhí)行的動(dòng)作(Action):頁(yè)面操作的動(dòng)作 執(zhí)行對(duì)象所需要的數(shù)據(jù)(Test Data):任何

    2024年02月10日
    瀏覽(27)
  • Python Selenium UI自動(dòng)化測(cè)試_python 自動(dòng)化ui測(cè)試

    Python Selenium UI自動(dòng)化測(cè)試_python 自動(dòng)化ui測(cè)試

    2.2 安裝selenium pip install selenium pip install selenium==2.53.0 2.3 下載webdriver驅(qū)動(dòng) 以chrome瀏覽器為例 查看chrome瀏覽器版本:在地址欄輸入 chrome://version chromedriver下載地址:http://chromedriver.storage.googleapis.com/index.html 下載與瀏覽器版本對(duì)應(yīng)的chrome driver 將下載好的chrome driver 解壓,并放至到

    2024年04月14日
    瀏覽(26)
  • Python + Selenium自動(dòng)化測(cè)試

    Python + Selenium自動(dòng)化測(cè)試

    一、python 1、python下載與安裝 官方下載地址: Python Releases for Windows | Python.org https://www.python.org/downloads/windows/ 下載應(yīng)用程序,雙擊運(yùn)行 選擇install now進(jìn)行安裝,下方勾選第二個(gè)選項(xiàng)系統(tǒng)可自動(dòng)添加環(huán)境變量 ? 等待python安裝 ?安裝完成后,點(diǎn)擊“Close”關(guān)閉 進(jìn)入cmd驗(yàn)證是否已完

    2023年04月24日
    瀏覽(18)
  • Selenium+python怎么搭建自動(dòng)化測(cè)試框架、執(zhí)行自動(dòng)化測(cè)試用例、生成自動(dòng)化測(cè)試報(bào)告、發(fā)送測(cè)試報(bào)告郵件

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

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

    2024年02月05日
    瀏覽(30)
  • 【自動(dòng)化測(cè)試】基于Selenium + Python的web自動(dòng)化框架

    【自動(dòng)化測(cè)試】基于Selenium + Python的web自動(dòng)化框架

    Selenium是一個(gè)基于瀏覽器的自動(dòng)化工具,她提供了一種跨平臺(tái)、跨瀏覽器的端到端的web自動(dòng)化解決方案。Selenium主要包括三部分:Selenium IDE、Selenium WebDriver 和Selenium Grid: ? 1、Selenium IDE:Firefox的一個(gè)擴(kuò)展,它可以進(jìn)行錄制回放,并可以把錄制的操作以多種語(yǔ)言(例如java,p

    2024年02月07日
    瀏覽(19)
  • 【軟件測(cè)試】python+selenium自動(dòng)化測(cè)試

    【軟件測(cè)試】python+selenium自動(dòng)化測(cè)試

    一、什么是自動(dòng)化測(cè)試 自動(dòng)化測(cè)試指軟件測(cè)試的自動(dòng)化,在預(yù)設(shè)狀態(tài)下運(yùn)行應(yīng)用程序或者系統(tǒng),預(yù)設(shè)條件包括正常和異常,最 后評(píng)估運(yùn)行結(jié)果。將人為驅(qū)動(dòng)的測(cè)試行為轉(zhuǎn)化為機(jī)器執(zhí)行的過(guò)程。 單元測(cè)試 java的單元測(cè)試框架是Junit,在這里不再贅述。 接口自動(dòng)化 接口測(cè)試就是

    2023年04月09日
    瀏覽(34)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包