13.4web自动化测试(Selenium3+Java)

news2024/10/3 2:19:42

一.定义

 用来做web自动化测试的框架.

二.特点

1.支持各种浏览器.

2.支持各种平台(操作系统).

3.支持各种编程语言.

4.有丰富的api.

三.工作原理

四.搭环境

1.对照Chrome浏览器版本号,下载ChromeDriver,配置环境变量,我直接把.exe文件放在了jdk安装路径的bin文件夹下了(jdk配置了环境变量).

2.创建mavem项目,在pom.xml文件中引入Selenium依赖.

<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>4.7.2</version>
</dependency>

3.创建启动类,用百度进行测试.

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

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选择器

1.id选择器: #id

2.类选择器: .class

3.标签选择器: 标签

4.后代选择器: 父级选择器, 子级选择器.

注意:两种选择器,建议使用CSS选择器,因为效率高.

六.Xpath选择器

1.绝对路径: /html/......(效率低,不常用).

2.相对路径: //......

a.相对路径+索引

//form/span[1]/input

注意: 数组下标从1开始.

b.相对路径+属性值

//input[@class="s_ipt"]

c.相对路径+通配符

//*[@*="s_ipt"]

d.相对路径+文本匹配

 //a[text()="新闻"]

七.WebDriver的常用方法

1.click: 点击.

2.sendKeys: 在对象上模拟键盘输入.

3.clear: 清除对象输入的文本内容.

4.(不推荐使用)submit: 提交,和click作用一样,但是有弊端,如果点击的元素放在非form标签中,此时submit会报错(比如超链接(a标签)).

5.text: 用于获取元素的文本信息.

6.getAttribute: 获取属性值.

以上所有内容的代码练习

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

import java.util.List;

import static java.lang.Thread.sleep;

public class Main {
    public static void main(String[] args) throws InterruptedException {
        // 测试是否通过的标致
        boolean flag = false;
        ChromeOptions options = new ChromeOptions();
        //允许所有请求
        options.addArguments("--remote-allow-origins=*");
        WebDriver webDriver = new ChromeDriver(options);
        // 1.打开百度首页
        webDriver.get("https://www.baidu.com/");
        String title = webDriver.getTitle();
        String url = webDriver.getCurrentUrl();
        if (url.equals("https://www.baidu.com/") && title.equals("百度一下,你就知道")) {
            System.out.println("title和url正确");
        } else {
            System.out.println("title和url不正确");
        }
        // 2.两种定位元素的方式: 1.cssSelector 2.Xpath
        // 使用浏览器,按F12,选中要测试的位置,在代码中拷贝.
        // 找到百度搜索输入框
        // 第一种: cssSelector
        WebElement element =  webDriver.findElement(By.cssSelector("#kw"));
        // 第二种: Xpath
        //WebElement Element = webDriver.findElement(By.xpath("//*[@id=\"kw\"]"));
        // 3.输入信息
        element.sendKeys("别克君越艾维亚");
        // 4.找到百度一下按钮
        // 5.点击按钮
        webDriver.findElement(By.cssSelector("#su")).click();
        sleep(2000);
        // 6.校验
        List<WebElement> elements = webDriver.findElements(By.cssSelector("a"));
        for (int i = 0; i < elements.size(); ++i) {
            if(elements.get(i).getText().contains("别克君越") || elements.get(i).getText().contains("艾维亚")) {
                System.out.println("测试通过");
                flag = true;
                break;
            }
        }
        if (!flag) {
            System.out.println("测试不通过");
        }
        // 清空输入框
        element.clear();
        sleep(1500);
        // 在输入框中重新输入内容
        element.sendKeys("别克威朗");
        webDriver.findElement(By.cssSelector("#su")).submit();
        // 获取属性值:百度一下
        System.out.println(webDriver.findElement(By.cssSelector("#su")).getAttribute("value"));
    }
}

八.等待

1.强制等待(sleep): 一直等待到规定时间.

2.智能等待: 设置的等待时间是最长的等待时间,如果完成了任务,会停止.

a.隐式等待(webDriver.manage().timeouts().implicitlyWait())

b.显示等待: 指定某个任务进行等待.

区别: 隐式等待是等待页面上所有因素加载进来,如果规定时间内没有加载进来,就会报错.而显示等待并不关心是否加载进来所有的元素,只要在规定时间内,在所有被加载进来的元素中包含指定的元素,就不会报错.

3.代码练习

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.time.Duration;


public class Main2 {
    public static void main(String[] args) {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接百度
        driver.get("https://www.baidu.com/");
        // 判断元素是否可以被点击

        // 隐式等待
//        driver.manage().timeouts().implicitlyWait(Duration.ofDays(5));

        // 显示等待
        WebDriverWait wait = new WebDriverWait(driver, Duration.ofMillis(3000));
        wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("#bottom_layer > div > p:nth-child(7) > a")));
    }
}

九.浏览器操作

1.前进: webdriver.navigate().back();

2.后退: webdriver.navigate().refresh();

3.刷新: webdriver.navigate().forward();

4.滚动条操作: 使用js脚本

划到最底端: 

((JavascriptExecutor)driver).executeScript("document.documentElement.scrollTop=10000");

5.最大化: driver.manage().window().maximize();

6.全屏: driver.manage().window().fullscreen();

7.设置长宽: driver.manage().window().setSize(new Dimension(600, 800));

8.代码

import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

import static java.lang.Thread.sleep;

public class Main3 {
    public static void main(String[] args) throws InterruptedException {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接百度
        driver.get("https://www.baidu.com/");
        driver.findElement(By.cssSelector("#kw")).sendKeys("君越艾维亚");
        driver.findElement(By.cssSelector("#su")).click();
        sleep(1500);
        // 回退
        driver.navigate().back();
        sleep(1500);
        // 刷新
        driver.navigate().refresh();
        sleep(1500);
        // 前进
        driver.navigate().forward();
        sleep(1500);
        // 滚动,使用js脚本
        // 划到最底端
        ((JavascriptExecutor)driver).executeScript("document.documentElement.scrollTop=10000");
        sleep(1500);
        // 最大化
        driver.manage().window().maximize();
        sleep(1500);
        // 全屏
        driver.manage().window().fullscreen();
        sleep(1500);
        // 最小化
        driver.manage().window().minimize();
        // 设置长宽
        driver.manage().window().setSize(new Dimension(600, 800));
    }
}

十.键盘

1.control + a: 
driver.findElement(By.cssSelector("#kw")).sendKeys(Keys.CONTROL, "A");

2.代码

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

import static java.lang.Thread.sleep;

public class Main4 {
    public static void main(String[] args) throws InterruptedException {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接百度
        driver.get("https://www.baidu.com/");
        driver.findElement(By.cssSelector("#kw")).sendKeys("君越艾维亚");
        // 键盘操作
        // control + A
        driver.findElement(By.cssSelector("#kw")).sendKeys(Keys.CONTROL, "A");
        sleep(1500);
        // control + X
        driver.findElement(By.cssSelector("#kw")).sendKeys(Keys.CONTROL, "X");
        sleep(1500);
        // control + V
        driver.findElement(By.cssSelector("#kw")).sendKeys(Keys.CONTROL, "V");
        sleep(1500);
    }
}

十一.鼠标

代码:

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;

import static java.lang.Thread.sleep;

public class Main5 {
    public static void main(String[] args) throws InterruptedException {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接百度
        driver.get("https://www.baidu.com/");
        driver.findElement(By.cssSelector("#kw")).sendKeys("君越艾维亚");
        driver.findElement(By.cssSelector("#su")).click();
        sleep(1500);
        // 鼠标操作
        WebElement element = driver.findElement(By.cssSelector("#s_tab > div > a.s-tab-item.s-tab-item_1CwH-.s-tab-pic_p4Uej.s-tab-pic"));
        Actions actions = new Actions(driver);
        sleep(1500);
        actions.moveToElement(element).contextClick().perform();

    }
}

十二.特殊场景

1.定位一组元素: 

勾选复选框

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

import java.util.List;

public class Main6 {
    public static void main(String[] args) {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接
        driver.get("???");
        List<WebElement> elements = driver.findElements(By.cssSelector("input"));
        // 遍历elements,如果vtype值是checkbox就点击
        // 使用
        for (int i = 0; i < elements.size(); ++i) {
            if (elements.get(i).getAttribute("type").contains("checkbox")) {
                elements.get(i).click();
            }
        }
    }
}

2.多框架定位: 在iframe中的a标签使用常规方法无法定位

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class Main7 {
    public static void main(String[] args) {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接
        driver.get("???");
        // 对iframe底下的a标签进行操作,不能直接定位,需要先切换
        // 输入id号,找到指定的iframe
        driver.switchTo().frame("f1");
        driver.findElement(By.cssSelector("???")).click();
    }

}

3.下拉框处理:

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.support.ui.Select;

public class Main8 {
    public static void main(String[] args) {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接
        driver.get("???");
        // 获取下拉框的元素
        WebElement element = driver.findElement(By.cssSelector("???"));
        Select select = new Select(element);
        // 可以通过多种方式定位,常用以下两种
        // 1.下标定位(下标从0开始计数)
        select.deselectByIndex(0);
        // 2.根据value值定位
        select.deselectByValue("???");
    }
}

4.弹窗处理: 针对alert

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class Main9 {
    public static void main(String[] args) {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接
        driver.get("???");
        // 点击弹窗
        driver.findElement(By.cssSelector("button")).click();
        // 取消弹窗
        driver.switchTo().alert().dismiss();
        // 点击弹窗
        driver.findElement(By.cssSelector("button")).click();
        // 输入内容
        driver.switchTo().alert().sendKeys("张三");
        // 点击确认
        driver.switchTo().alert().accept();
    }
}

5.上传文件

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class Main10 {
    public static void main(String[] args) {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接
        driver.get("???");
        // 上传文件
        driver.findElement(By.cssSelector("???")).sendKeys("此处填写文件路径");

    }
}

十三.补充

1.关闭浏览器

a)driver.quit();

退出浏览器,清空缓存(如cookie).

b)driver.close();

关闭当前正在操作的页面(不是最新的页面,要看当前正在操作的页面)

c)代码

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

import static java.lang.Thread.sleep;

public class Main11 {
    public static void main(String[] args) throws InterruptedException {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接百度
        driver.get("https://www.baidu.com/");
        driver.findElement(By.cssSelector("#s-top-left > a:nth-child(1)")).click();
        sleep(1500);
        //driver.close();
        driver.quit();
    }
}

2.切换窗口

a)driver.getWindowHandle();

获取页面句柄,不是最新的页面,是当前正在操作的页面.

b)Set<String> windowHandles = driver.getWindowHandles();

获取所有页面的局部,最后一个就是最新页面的句柄.

c)代码:

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

import java.util.Set;

public class Main12 {
    public static void main(String[] args) {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接百度
        driver.get("https://www.baidu.com/");
        // 点击新的页面
        driver.findElement(By.cssSelector("#s-top-left > a:nth-child(1)")).click();
        System.out.println(driver.getWindowHandle());
        String handle = null;
        Set<String> windowHandles = driver.getWindowHandles();
        for (String str : windowHandles) {
            handle = str;
            System.out.println(str);
        }
    }
}

运行结果: 

3.截图

a)去maven中央仓库找common-io依赖

<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.11.0</version>
        </dependency>

b) File screenshotAs = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
    FileUtils.copyFile(screenshotAs, new File("D://picture/123.png"));

c)代码

import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

import java.io.File;
import java.io.IOException;

import static java.lang.Thread.sleep;

public class Main13 {
    public static void main(String[] args) throws IOException, InterruptedException {
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--remote-allow-origins=*");
        // 创建驱动
        WebDriver driver = new ChromeDriver(options);
        // 连接百度
        driver.get("https://www.baidu.com/");
        driver.findElement(By.cssSelector("#kw")).sendKeys("别克君越艾维亚");
        driver.findElement(By.cssSelector("#su")).click();
        sleep(1500);
        File screenshotAs = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
        FileUtils.copyFile(screenshotAs, new File("D://picture/123.png"));
    }
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1128542.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

最新Python深度学习技术进阶与应用

最新Python深度学习技术进阶与应用&#xff08;图神经网络&#xff09; 近年来&#xff0c;伴随着以卷积神经网络&#xff08;CNN&#xff09;为代表的深度学习的快速发展&#xff0c;人工智能迈入了第三次发展浪潮&#xff0c;AI技术在各个领域中的应用越来越广泛。为了帮助广…

网络第一课

✍ 如何理解局域网和广域网&#xff1f; ✍ 路由器和交换机是怎样工作的&#xff1f; ✍ 三层交换机能不能代替路由器&#xff1f; -- 1.局域网 2. 广域网 -- -- 企业网络 运营商架构 数据中心架构 -- 局域网 - 内网 - 私网 -- 通过交换机连接的 转发相同IP地址段的…

若依和芋道

国外卷技术,国内卷业务,做管理业务通常使用开源框架就可以快速满足,若依和芋道都是开源二开工具较为流行的框架,芋道是基于若依的,基本上是开发人员自己写业务开发框架的天花板,两者的前端都是基于vue-element-admin的,使用Gitee上两者的SpringBoot的最轻量化版本进行对…

Transformer 简单理解

文章目录 一、Transformer的架构一、编码1.1 词向量编码&#xff08;Input Embedding&#xff09;1.2 位置编码&#xff08;Positional Encoding&#xff09; 二、Mask2.1 PAD Mask2.2 上三角Mask 二、注意力计算2.1 Q、K、V 向量的生成2.2 自注意力计算流程2.2 单头注意力和多…

MTK OEM解锁步骤

1.在win10 首选安装驱动 插入usb线后&#xff0c;进入在设备管理器 里面看到 未识别黄色图标的 android 以后&#xff0c;右击点击更新驱动&#xff0c;然后安装解压后的驱动 同时在开发者模式里面的 oem解锁开关打开 2. adb 命令解锁步骤 1.adb reboot bootloader 2.fastbo…

Json字符串转换小工具

下载【免费】Json字符串格式化和压缩&#xff0c;支持数组元素的不换行且能转换成16进制资源-CSDN文库 推荐理由&#xff1a; 离线使用支持json字符串的数据格式化和压缩&#xff0c;如&#xff1a;图1支持数组元素的16进制转换&#xff0c;如&#xff1a;图2支持数组元素不换…

【AI视野·今日CV 计算机视觉论文速览 第272期】Fri, 20 Oct 2023

AI视野今日CS.CV 计算机视觉论文速览 Fri, 20 Oct 2023 Totally 62 papers &#x1f449;上期速览✈更多精彩请移步主页 Daily Computer Vision Papers Putting the Object Back into Video Object Segmentation Authors Ho Kei Cheng, Seoung Wug Oh, Brian Price, Joon Youn…

用长tree方式做等长线

我正在「拾陆楼」和朋友们讨论有趣的话题,你⼀起来吧? 拾陆楼知识星球入口 相关文章链接: 用set_data_check的方式做等长线 前面讲过了如何用set_data_check做等长线,这里再讲一下如何用cts的方式做。 1)写一个sdc,把等长线的起点设置成clock source,用于创建create_…

网易云音乐下载的歌曲能永久听吗?超级简单!

网易云下载的歌曲当然可以永久听&#xff0c;只是因为网易云音乐是ncm格式&#xff0c;在很多平台不兼容&#xff0c;这时候就需要转换成兼容性更高的MP3格式&#xff0c;了解一些音频转换工具&#xff0c;就可以轻松搞定&#xff01; 方法一&#xff1a;使用野葱视频转换器 1…

Shor算法30年来首次重大改进!更快破解密码

&#xff08;图片来源&#xff1a;网络&#xff09; 1994年&#xff0c;美国麻省理工学院 (MIT) 的应用数学家 Peter Shor 实现了量子计算机的第一个实际应用&#xff1a;破译密码。他展示了在查找大质数的质因子时&#xff0c;量子计算机比传统计算机要快得多&#xff0c;查找…

AOP 笔记

AOP【面向切面编程】 作用&#xff1a;在不惊动原始设计的基础上进行功能增强。 无侵入式编程 连接点&#xff1a;程序执行的任意位置&#xff0c;SpringAOP中&#xff0c;理解为方法的执行。 切入点&#xff1a;匹配连接点的式子,要追加功能的方法 通知&#xff08;写在通…

python append()会造成的同时改变list里两个数据的问题

运行时debug发现&#xff0c;给vertice[474][2]赋值&#xff0c;会改变vertice[40][2]&#xff0c;改变vertice[40][2]的时候vertice[474][2]也同时变了&#xff0c;好像这两个被绑定了&#xff1b; 后续调查发现生成vertice时使用了vertice.append(vertice[i])这种浅拷贝语句…

SpringBoot集成Redis主从架构实现读写分离(哨兵模式)

一、前言 这里会使用到spring-boot-starter-data-redis包&#xff0c;spring boot 2的spring-boot-starter-data-redis中&#xff0c;默认使用的是lettuce作为redis客户端&#xff0c;也推荐使用lettuce&#xff0c;Redis使用哨兵集群&#xff0c;这里会通过lettuce连接到哨兵…

MCmod:冰与火之歌:龙骑士(一)

1.前言 1.投果结果 我在11天前&#xff08;约2023年10月5日&#xff09;发布了投票&#xff1a;更新选择。 链接&#xff1a;https://blink.csdn.net/details/1585093?spm1001.2014.3001.5501 植物大战僵尸各种僵尸攻略系列已经结束了&#xff0c;你们想要下一个更什么系列 …

1-08 移动端适配 rem+vm

移动端适配 remvm React配置postcss-px-to-viewport 安装依赖&#xff1a;在项目根目录下运行以下命令安装所需的依赖包&#xff1a; npm install postcss-px-to-viewport --save-dev配置代码 const path require(path);module.exports {webpack: {alias: {: path.resolv…

关于binwalk->sasquatch插件安装错误的缓解方案

一些相关报错&#xff1a; WARNING: Extractor.execute failed to run external extractor ‘sasquatch -p 1 -le -d ‘squashfs-root’ ‘%e’’: [Errno 2] No such file or directory: ‘sasquatch’, ‘sasquatch -p 1 -le -d ‘squashfs-root’ ‘%e’’ might not be in…

旋转设备实施预测性维护面临的挑战及解决方案

旋转设备是工业领域中至关重要的一类设备&#xff0c;然而&#xff0c;它们常常面临着各种故障和损耗&#xff0c;给生产运行和设备维护带来了诸多挑战。为了应对这些挑战&#xff0c;越来越多的企业开始采用预测性维护技术&#xff0c;以提前发现故障迹象并采取相应措施。本文…

PS软件 点击 “另存为 Web 所用格式” ,提示错误 无法完成操作 系统找不到指定路径

软件&#xff1a;Adobe Photoshop 问题&#xff1a; PS 点击 另存为 Web 所用格式 &#xff0c;提示错误 无法完成操作 系统找不到指定路径 解决&#xff1a; 如果是Win10以上的系统&#xff0c;出现这种情况基本就是被系统自带的杀毒软件阻止了&#xff0c;可以看一下电脑右…

嵌入式实时操作系统的设计与开发(互斥量学习)

一个无论多么小的系统&#xff0c;都会有大系统的缩影&#xff0c;就像俗话说“麻雀虽小五脏俱全”。 嵌入式实时操作系统中除了基本调度机制&#xff08;创建线程、调度线程、挂起线程等&#xff09;&#xff0c;事件处理机制&#xff08;中断管理、时钟管理&#xff09;、内…

JOSEF约瑟 分合闸电源监视继电器 ZZS-7G/1 220VAC/3S 导轨式安装

系列型号&#xff1a; ZZS-7G/1分闸、合闸、电源监视综合控制装置&#xff1b; ZZS-7G/11分闸、合闸、电源监视综合控制装置&#xff1b; ZZS-7G/23分闸、合闸、电源监视综合控制装置&#xff1b; ZZS-7G/24分闸、合闸、电源监视综合控制装置&#xff1b; ZZS-7/1G11分闸、…