grid学习笔记


参考:

https://www.imooc.com/article/31609

https://blog.csdn.net/lb245557472/article/details/91966770

grid官网下载

https://www.selenium.dev/downloads/

启动主节点和子节点

java -jar /Users/lucax/Desktop/测/grid/selenium-server-standalone-3.141.59.jar -role hub -port 4444

控制面板地址:  http://localhost:4444/grid/console


java -jar selenium-server-standalone-3.141.59.jar -role node -hub http://192.168.116.120:4444/grid/register/ -port 5577

启动代码

#coding=utf-8
import time
from selenium import webdriver

class a():
	def bb(self):
		ds = {'platform': 'ANY',
      'browserName': "chrome",
      'version': '',
      'javascriptEnabled': True,
      "maxSession":2
      }

		hostList=["http://192.168.116.120:5577/wd/hub","http://192.168.116.120:4444/wd/hub"]

		for i in hostList:
			print(i)
			dr = webdriver.Remote(command_executor=i,
							# executable_path = "/Users/lucax/Desktop/测/grid/chromedriver",
			                  desired_capabilities=ds
			                  )

			dr.get("http://baidu.com/")
			time.sleep(3)
			print("走到这里")
			dr.quit()
			print("执行完毕")

if __name__ == '__main__':
	a().bb()

appium

https://www.bilibili.com/video/BV1oK411J7rq?spm_id_from=333.337.search-card.all.click

感觉只是调用远程设备而已,用到再看看