首页 文章 精选 留言 我的

精选列表

搜索[博客系统],共10000篇文章
优秀的个人博客,低调大师

[python作业AI毕业设计博客]selenium工具python快速入门1简介

概述 Selenium是一个开源自动化测试套件,适用于跨浏览器和平台的Web应用程序。 它是一组软件工具,每种工具都有不同的方法来支持测试自动化。 Selenium3.*的组件如下: Selenium IDE(集成开发环境 Integrated Development Environment) Selenium WebDriver Selenium Grid Selenium3.停止直接使用Selenium RC。 Selenium Core已从最新版本的Selenium 3.中完全删除。 官网:http://www.seleniumhq.org/ Selenium开源,基于Apache 2.0 License。github: https://github.com/SeleniumHQ/selenium Selenium IDE Se

优秀的个人博客,低调大师

[雪峰磁针石博客]python 3.7极速入门教程7互联网

本文教程目录 7互联网 互联网访问 urllib urllib是用于打开URL的Python模块。 import urllib.request # open a connection to a URL using urllib webUrl = urllib.request.urlopen('https://china-testing.github.io/address.html') #get the result code and print it print ("result code: " + str(webUrl.getcode())) # read the data from the URL and print it data = webUrl.read() print (data) json json是一种受JavaScript对象文字语法启发的轻量级数据交换格式。是目前互联网最流行的数据交换格式。 json公开了标准库marshal和pickle模块的用户所熟悉的API。 >>> import json >>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}]) '["foo", {"bar": ["baz", null, 1.0, 2]}]' >>> print(json.dumps("\"foo\bar")) "\"foo\bar" >>> print(json.dumps('\u1234')) "\u1234" >>> print(json.dumps('\\')) "\\" >>> print(json.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True)) {"a": 0, "b": 0, "c": 0} >>> from io import StringIO >>> io = StringIO() >>> json.dump(['streaming API'], io) >>> io.getvalue() '["streaming API"]' 参考资料 讨论qq群144081101 591302926 567351477 钉钉免费群21745728 本文最新版本地址 本文涉及的python测试开发库 谢谢点赞! XML XML即可扩展标记语言(eXtensible Markup Language)。它旨在存储和传输中小数据量,并广泛用于共享结构化信息。 import xml.dom.minidom doc = xml.dom.minidom.parse("test.xml"); # print out the document node and the name of the first child tag print (doc.nodeName) print (doc.firstChild.tagName) # get a list of XML tags from the document and print each one expertise = doc.getElementsByTagName("expertise") print ("{} expertise:".format(expertise.length)) for skill in expertise: print(skill.getAttribute("name")) # create a new XML tag and add it into the document newexpertise = doc.createElement("expertise") newexpertise.setAttribute("name", "BigData") doc.firstChild.appendChild(newexpertise) print (" ") expertise = doc.getElementsByTagName("expertise") print ("{} expertise:".format(expertise.length)) for skill in expertise: print (skill.getAttribute("name")) ElementTree是处理XML文件的简便方法。 import xml.dom.minidom import xml.etree.ElementTree as ET tree = ET.parse('items.xml') root = tree.getroot() # all items data print('Expertise Data:') for elem in root: for subelem in elem: print(subelem.text)

优秀的个人博客,低调大师

[雪峰磁针石博客]python 3.7极速入门教程2 Hello与变量

Hello 命令行方式 $ python Python 3.7.0 (default, Jun 28 2018, 13:15:42) [GCC 7.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> print("Hello, https://china-testing.github.io/") Hello, https://china-testing.github.io/ ipython方式 $ ipython Python 3.7.0 (default, Jun 28 2018, 13:15:42) Type 'copyright', 'credits' or 'license' for more information IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: print("Hello, https://china-testing.github.io/") Hello, https://china-testing.github.io/ IDE方式 文件方式 上面代码地址:https://github.com/china-testing/python-api-tesing/blob/master/python3.7quick/2hello.py __main__ 当Python解释器读取源文件时,它将执行其中的所有代码。 当Python运行“源文件”作为主程序时,它将特殊变量( __name __)设置为具(“ __main __”)。 “if __name __ ==” __main __“允许您将Python文件作为可重用模块或独立程序运行。 与C一样,Python使用==进行比较,而使用=进行赋值。 上面代码地址:https://github.com/china-testing/python-api-tesing/blob/master/python3.7quick/2main.py 参考资料 讨论qq群144081101 591302926 567351477 钉钉免费群21745728 本文最新版本地址 本文涉及的python测试开发库 谢谢点赞! 本文相关海量书籍下载 https://linuxize.com/post/how-to-install-anaconda-on-ubuntu-18-04/ 变量 Python变量是用于存储值的保留内存位置。 换句话说,python程序中的变量将数据提供给计算机进行处理。 Python中的每个值都有数据类型。 Python中不同的数据类型是数值,列表,元组,字符串,字典等。变量可以用任何名称声明,甚至可以用a,aa,abc等字母表来声明,命名规则和C语言的类似。字母或下划线开头,除第一位外可以包含数字。 上面代码地址:https://github.com/china-testing/python-api-tesing/blob/master/python3.7quick/2var.py 作用域 如果要在程序或模块的其余部分使用相同的变量,可声明为全局变量;如果只在特定函数或方法中使用该变量,则使用局部变量。 让我们通过以下程序理解本地变量和全局变量之间的差异。 全局变量f被赋予值101 函数中声明局部变量,赋值"I am learning Python." 上面代码地址:https://github.com/china-testing/python-api-tesing/blob/master/python3.7quick/2local.py 关键字global,可以在函数内引用全局变量。 实际上局部找不到变量也会到全局去找。上面代码地址:https://github.com/china-testing/python-api-tesing/blob/master/python3.7quick/2global.py 使用命令del“variable name”可以删除变量。 在下面的例子中,我们删除了变量f,当我们继续打印它时,得到错误“变量名未定义”,这意味着你已经删除了变量。

资源下载

更多资源
Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册