当前位置:网站首页>Cross browser testing of selenium
Cross browser testing of selenium
2022-06-29 18:58:00 【It's Joe Joe】
Selenium Standalone Server
Important components of remote testing , Can pass RemoteWebDriver Class listens through a specific port selenium According to the command given by the test script .Selenium Standalone Server Almost all browsers are supported , Including based on Appium Support mobile platforms .
Selenium Standalone Server rely on JRE6 The above environment runs , It has its own Java Language development .
Download address :http://docs.seleniumhq.org/ download/
start-up
Selenium Standalone Server Can be started in different modes or roles .
On the remote machine jar Execute the following command under the package directory to start :
java –jar selenium-server-standalone-2.41.0.jar
The default port number is 4444.
Browser input :http://:4444/wd/hub/static/resource/ hub.html
You can see Selenium Standalone Server Interface after service startup .
Perform the test
Selenium Server To perform tests on, you need to use RemoteWebDriver, The Remote Class will interact with as a client selenium Server Interact , To run the test on a remote machine .
in addition , We also need to set up desired_capabilities, That is, the configuration of the browser and operating system , And some other related configurations needed to run the test .
desired_caps = {
}
desired_caps['platform'] = 'WINDOWS'
desired_caps['browserName'] = 'firefox'
Then create Remote Class instance passed to desired_capabilities, When the script executes ,Remote Class will connect and request Selenium Server start-up Windows On the platform Firefox The browser performs tests .
self.driver = webdriver.Remote('http://192.168.1.103:4444/wd/hub', desired_caps)
To configure Chrome Support :
chrome.driver="C:\SeDrivers\chromedriver.exe" -jar selenium-server-standalone-2.41.0.jar
Selenium Grid
Selenium Grid Tests can be distributed across several physical or virtual machines , So as to realize distributed or parallel test execution , To achieve the purpose of less test execution cycle and cross browser testing .
边栏推荐
- Failed to allocate graph: myriad device is not opened
- Anaconda安装并配置jupyter notebook远程
- 您好,请问mysql cdc、和postgresql cdc有官网样例吗?给个链接学习了
- The table ‘table_name‘ is full 异常排查及解决方案
- 元素等待机制
- BeanUtils属性复制的用法
- Selenium WebDriver的高级特性
- Redis(一)--Redis入门(1)--Redis介绍、安装与启动、常用配置
- Tag filtering and SQL filtering of rocketmq
- js文本粒子动态背景
猜你喜欢

JWT登录验证

Shandong University project training (VIII) design rotation map entry page

The table ‘table_ Name 'is full exception troubleshooting and solution

Leetcode 984. String without AAA or BBB (thought of netizens)

These advantages of the Institute are really fragrant! The landing rate is still very high!

如何使用物联网低代码平台进行服务管理?

Up to 81.98%! Announcement of undergraduate study rate of more than 100 "double first-class" Universities

CentOS 7.5 install MySQL 8.0.27---yum

对强缓存和协商缓存的理解

Mac: MySQL 66 questions, 20000 words + 50 pictures!
随机推荐
如何将OAK相机当做网络摄像头使用?
unittest单元测试框架
76. nearest common ancestor of binary tree
What is a multi paradigm programming language and what does "multi paradigm" mean?
Hello, do you have any official website samples for MySQL CDC, PostgreSQL CDC? Give me a link to learn
[Nanjing University] information sharing of the first and second postgraduate entrance examinations
如何使用物联网低代码平台进行服务管理?
MySQL Enterprise Development Specification
优雅书写Controller(参数验证+统一异常处理)
Page Object与数据驱动测试
如何在树莓派上使用OAK相机?
2. add customized related files to the keil5 project established by stm32cubemx
《安富莱嵌入式周报》第271期:2022.06.20--2022.06.26
暴力解决《猜名次》问题
Cannot retrieve repository metadata processing records
Anfulai embedded weekly report no. 271: June 20, 2022 to June 26, 2022
数据分析--时间序列预测
The 8th "Internet +" competition - cloud native track invites you to challenge
Interview question 10.10 Rank of digital stream
Using protobuf to link MySQL in unrealeengine plug-in