selenium

了解Katalon的安装及基本使用(for mac)

故事扮演 提交于 2021-01-25 06:20:53
一、整体了解: 2018 top 6的自动化测试工具(网上了解): 1. Selenium 2. Katalon Studio 3. UFT 4. Watir 5. IBM Rational Functional Tester 6. TestComplete 更多参考:https://zhuanlan.zhihu.com/p/30605918 二、需求:需要在最近的项目中进行UI自动化测试,我期望的是不要像slenium那样成本太高,需要维护成本高,时间也太长的工具。能够自动的录制回放智能的操作要求 Katalon的诞生: 1、完全支持自动录制回放且不用写开发脚本 2、 Katalon 用的是 Java 和 Apache Groovy 作为其脚本开发语言 3、 Katalon 提供了 Spy 和 Record 两个让构建及其他构建(如:从文件数据库等获取数据填充到测试文本框、搜索框变量中) 4、 免费开源、易用的图形化的工具 三、环境要求 System Requirements Supported Environment 四、基础使用、下载激活(Katalon Studio)此处使用的是mac,如果是windows则选择对应系统的exe文件进行下载 1、下载路径:https://www.katalon.com/(输入姓名、邮箱、密码进行注册登录) 2、进入查看可供选择的环境,并下载

Adding a product to cart on Supreme via POST requests in Python - Request not working

旧时模样 提交于 2021-01-24 19:26:33
问题 I am trying to make a bot in Python that can add a product to my cart on Supreme upon detection. I want this to be efficient, and when I try to use HTTP post requests to get the job done, I receive response code 200 (OK) but the product isn't added in my basket. I have tried this with both the Python requests module and the selenium requests module. The code is below: post_headers = {'User-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0

Adding a product to cart on Supreme via POST requests in Python - Request not working

南楼画角 提交于 2021-01-24 19:25:32
问题 I am trying to make a bot in Python that can add a product to my cart on Supreme upon detection. I want this to be efficient, and when I try to use HTTP post requests to get the job done, I receive response code 200 (OK) but the product isn't added in my basket. I have tried this with both the Python requests module and the selenium requests module. The code is below: post_headers = {'User-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0

Adding a product to cart on Supreme via POST requests in Python - Request not working

主宰稳场 提交于 2021-01-24 19:24:29
问题 I am trying to make a bot in Python that can add a product to my cart on Supreme upon detection. I want this to be efficient, and when I try to use HTTP post requests to get the job done, I receive response code 200 (OK) but the product isn't added in my basket. I have tried this with both the Python requests module and the selenium requests module. The code is below: post_headers = {'User-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0

Adding a product to cart on Supreme via POST requests in Python - Request not working

眉间皱痕 提交于 2021-01-24 19:24:23
问题 I am trying to make a bot in Python that can add a product to my cart on Supreme upon detection. I want this to be efficient, and when I try to use HTTP post requests to get the job done, I receive response code 200 (OK) but the product isn't added in my basket. I have tried this with both the Python requests module and the selenium requests module. The code is below: post_headers = {'User-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0

selenium之京东商品爬虫

橙三吉。 提交于 2021-01-24 14:51:14
# 今日目标 **selenium之京东商品爬虫** 自动打开京东首页,并输入你要搜索的东西,进入界面进行爬取信息 ``` from selenium import webdriver import time class JdSpider(object): def __init__ (self): self.browser = webdriver.Chrome() self.url = ' http://www.jd.com/ ' self.i = 0 # 获取商品 def get_page(self): # 打开京东 self.browser.get(self.url) # 找两个节点 self.browser.find_element_by_xpath( ' //*[@id="key"] ' ).send_keys( ' Python书籍 ' ) self.browser.find_element_by_xpath( ' //*[@id="search"]/div/div[2]/button ' ).click() # 留出时间给页面加载 time.sleep(2 ) # 解析页面 def parse_page(self): # 把下拉菜单拉到底部,执行JS脚本 self.browser.execute_script( ' window.scrollTo(0,document

selenium.common.exceptions.TimeoutException: Message: Timed out waiting for page to load using IEDriverServer and Internet Explorer through Selenium

南笙酒味 提交于 2021-01-24 11:16:24
问题 Given this code : from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.support.ui import Select from selenium.webdriver.common.by import By # import org.openqa.selenium.Keys import datetime import time import unittest cap = DesiredCapabilities().INTERNETEXPLORER cap['ignoreProtectedModeSettings'] = True cap['IntroduceInstabilityByIgnoringProtectedModeSettings'] = True cap['nativeEvents'] = True cap[

selenium.common.exceptions.TimeoutException: Message: Timed out waiting for page to load using IEDriverServer and Internet Explorer through Selenium

若如初见. 提交于 2021-01-24 11:16:06
问题 Given this code : from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.support.ui import Select from selenium.webdriver.common.by import By # import org.openqa.selenium.Keys import datetime import time import unittest cap = DesiredCapabilities().INTERNETEXPLORER cap['ignoreProtectedModeSettings'] = True cap['IntroduceInstabilityByIgnoringProtectedModeSettings'] = True cap['nativeEvents'] = True cap[

Rerun failed tests using Specflow.Retry

江枫思渺然 提交于 2021-01-24 09:36:04
问题 I'm trying to rerun failed tests in specflow using specflow.retry plugin https://github.com/DamirAinullin/specflow-retry Here is my App.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <unitTestProvider name="nUnit" /> <plugins> <add name="SpecFlow.Retry.Generator" path="..\packages\SpecFlow.Retry.2.4.0\lib\net45" type="Generator" /> </plugins> </configuration> I'd appreciate any help if someone gives a hint what's wrong from my side Here is a few warning that i get on

Rerun failed tests using Specflow.Retry

时间秒杀一切 提交于 2021-01-24 09:35:31
问题 I'm trying to rerun failed tests in specflow using specflow.retry plugin https://github.com/DamirAinullin/specflow-retry Here is my App.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <unitTestProvider name="nUnit" /> <plugins> <add name="SpecFlow.Retry.Generator" path="..\packages\SpecFlow.Retry.2.4.0\lib\net45" type="Generator" /> </plugins> </configuration> I'd appreciate any help if someone gives a hint what's wrong from my side Here is a few warning that i get on