Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行时走到driver = WebChrome()时 #11

Open
2019GJ opened this issue Jan 27, 2021 · 0 comments
Open

运行时走到driver = WebChrome()时 #11

2019GJ opened this issue Jan 27, 2021 · 0 comments

Comments

@2019GJ
Copy link

2019GJ commented Jan 27, 2021

【操作】:
1、设置内设置了Chrome的路径
2、连接窗口
3、根据提示导入必要的引入
4、driver.get输入一个网址
5、运行

【结果】:
点击进行运行后走到driver = WebChrome()报错,如下所示:

ERROR: runTest (app.widgets.code_runner.ide_launcher.AirtestIDECase)

Traceback (most recent call last):
File "airtest\cli\runner.py", line 73, in runTest
File "site-packages\six.py", line 693, in reraise
File "airtest\cli\runner.py", line 70, in runTest
File "C:\Users\tuya\Desktop\web_UI\untitled.air\untitled.py", line 9, in
driver = WebChrome()
File "D:\ruanjian\Airtest\AirtestIDE-win-1.2.5\AirtestIDE\airtest_selenium\proxy.py", line 30, in init
service_log_path=service_log_path, desired_capabilities=desired_capabilities)
File "D:\ruanjian\Airtest\AirtestIDE-win-1.2.5\AirtestIDE\selenium\webdriver\chrome\webdriver.py", line 81, in init
desired_capabilities=desired_capabilities)
File "D:\ruanjian\Airtest\AirtestIDE-win-1.2.5\AirtestIDE\selenium\webdriver\remote\webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "D:\ruanjian\Airtest\AirtestIDE-win-1.2.5\AirtestIDE\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "D:\ruanjian\Airtest\AirtestIDE-win-1.2.5\AirtestIDE\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "D:\ruanjian\Airtest\AirtestIDE-win-1.2.5\AirtestIDE\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Windows NT 10.0.18363 x86_64)


Ran 1 test in 7.815s

备注,【源码如下】:
from airtest.core.api import *

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from airtest_selenium.proxy import WebChrome
driver = WebChrome()
driver.implicitly_wait(20)

auto_setup(file)
driver.get("chrome://new-tab-page/")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant