当前位置: 首页 > wzjs >正文

站长工具 seo综合查询能搜索附近人的软件

站长工具 seo综合查询,能搜索附近人的软件,优钙网logo设计,新公司网络推广一、问题描述 自动化程序运行后发现运行目录下生成的html报告文件内容为空,没有运行结果。 二、测试环境 操作系统:Windows 11 家庭版BeautifulReport:0.1.3Python:3.11.9Appium-Python-Client:5.0.0Appium Server:2.…

一、问题描述

        自动化程序运行后发现运行目录下生成的html报告文件内容为空,没有运行结果。

二、测试环境

  1. 操作系统:Windows 11 家庭版
  2. BeautifulReport:0.1.3
  3. Python:3.11.9
  4. Appium-Python-Client:5.0.0
  5. Appium Server:2.17.1

三、源代码

import unittest
import osfrom appium import webdriver
from appium.options.android import UiAutomator2Options
from appium.webdriver.common.appiumby import AppiumBy
from BeautifulReport import BeautifulReport  # 导入 BeautifulReportcapabilities = dict(platformName='Android',automationName='uiautomator2',deviceName='Android',appPackage='com.android.settings',appActivity='.Settings',language='en',locale='US'
)appium_server_url = 'http://localhost:4723'class TestAppium(unittest.TestCase):def setUp(self) -> None:self.driver = webdriver.Remote(appium_server_url, options=UiAutomator2Options().load_capabilities(capabilities))def tearDown(self) -> None:if self.driver:self.driver.quit()def test_find_battery(self) -> None:el = self.driver.find_element(by=AppiumBy.XPATH, value='//*[@text="Battery"]')el.click()if __name__ == '__main__':report_dir = './reports'if not os.path.exists(report_dir):os.makedirs(report_dir)suite = unittest.TestSuite()suite.addTest(unittest.makeSuite(TestAppium))runner = BeautifulReport(suite)runner.report(filename='test_report.html',  # 报告文件名description='Appium Test Report',  # 报告描述report_dir=report_dir  # 报告保存路径)

四、解决办法

        报告模板中的资源加载失败。修改 BeautifulReport 的模板文件 template.html

    1.template.html文件位置

        作者的位置如下,每个人自己的路径不一样,仅供参考。

C:\Users\PAL\AppData\Roaming\Python\Python311\site-packages\BeautifulReport\template

         2.替换

        替换成下面的 CSS 和 JavaScript 链接

<!-- CSS -->
<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.0.0-beta3/css/fontawesome.css" rel="stylesheet">
<link href="https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet">
<link href="https://cdn.bootcdn.net/ajax/libs/chosen/1.8.8.rc6/chosen.css" rel="stylesheet"><!-- JavaScript -->
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.2.2/echarts.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/chosen/1.8.8.rc6/chosen.jquery.js"></script>

            3.保存

            修改后保存template.html,重新运行自动化程序,报告生成。

    http://www.dtcms.com/wzjs/597203.html

    相关文章:

  1. 广州市官网网站建设多少钱减肥网站开发目的
  2. 网站公司用什么软件做网站wordpress 禁止头像
  3. 云南网络公司网站织梦模板源码下载
  4. 洛阳做网站公司在哪上海网网站建设
  5. 如何建设红色旅游网站百度移动版
  6. 服务器关闭 网站被k做网站建设怎么找客户
  7. 成都微信网站建设多做网站让人来注册
  8. 安徽网站关键字优化网站搜索排名
  9. 肇庆建站模板源码wordpress充值会员插件
  10. 潍坊网站建设咨询wordpress黑白主题
  11. 网站建设策划书范文昆明广告设计公司排行
  12. fullpage网站网站建站金融模板
  13. 网站备案号查不到wordpress模板值钱
  14. 怎么做县城分类信息网站建设外汇网站
  15. 长春火车站建在哪里企业建站系统cms
  16. 青山湖南昌网站建设电子商务网站租用服务器费用
  17. 中国亚马逊网站建设crm和erp的区别
  18. 提供邵阳网站建设网上帮人做网站
  19. 有些人做网站不用钱的,对吗?欧美在线网站设计教程
  20. 如何做搞笑的视频视频网站网站建设的趋势
  21. 广东网站建设方案临沂网站
  22. 厦门 微网站制作免费网站安全
  23. 创业网站模板天津网络推广公司
  24. wordpress 免费模版西安seo培训
  25. 网站怎么制作范例网站怎么做
  26. 华为云怎么做网站网站搜索功能
  27. 哪家网站设计公司好广告设计公司简介内容
  28. 潍坊大型做网站建设的公司制作免费网站
  29. 淘宝客的网站是怎么做的山东网优
  30. 免费观看行情软件网站下载欧美品牌网站设计