在Chromium浏览器中使用Selenium [英] Use Selenium with Chromium Browser

查看:154
本文介绍了在Chromium浏览器中使用Selenium的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Selenium选项(在Firefox上)中,我可以找到 自定义浏览器

In the Selenium options (on Firefox) I can find Custom browser.

是否可以使用此选项在铬浏览器(不是Chrome)中运行硒测试?

Is it possible to use this option to run a Selenium test in Chromium Browser (not Chrome)?

推荐答案

是。对于Chromium使用:

Yes. For Chromium use:

DefaultSelenium selenium = new DefaultSelenium("localhost", 4444, "*custom path/to/chromium" , "www.google.com");
selenium.start();

您可以使用的其他选项是* custom,* chrome(注意:这不是Google chrome,它是Firefox模式),* googlechrome,* iexplore。请检查硒文档以获取模式的完整列表。

The other options that you can use are *custom, *chrome(note: this is not Google chrome, its a firefox mode only), *googlechrome, *iexplore. Please check selenium documentation for complete list of the modes.

编辑:将googlechrome更改为铬

Changed googlechrome to chromium

这篇关于在Chromium浏览器中使用Selenium的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆