简体   繁体   English

Selenium中的法语Chrome浏览器

[英]French Chrome browser in Selenium

I want to run Selenium tests with a French browser. 我想用法语浏览器运行Selenium测试。 Right now i setup my Chrome to be in French but when i run the test it opens up English Chrome. 现在,我将Chrome设置为法语,但是运行测试时,它将打开英语Chrome。 Is there way around this? 有办法解决吗?

Thanks. 谢谢。 I'm using C# to code this. 我正在使用C#对此进行编码。

Create a profile and to use with chrome that defaults lang to French. 创建一个配置文件并与默认使用lang法语的chrome一起使用。 Otherwise there may be a chrome switch for it (can't remember thou) 否则可能有一个镀铬的开关(不记得了)

You can try this when you setup your 'french' Google Chrome profile: 您可以在设置“法语” Google Chrome个人资料时尝试此操作:

  1. Type a search query into Google 在Google中输入搜索查询
  2. Click the toolbar in the top right corner and select "Search settings" 点击右上角的工具栏,然后选择“搜索设置”
  3. Click on "Location", type in your address, and click Save 点击“位置”,输入您的地址,然后点击保存

But keep in mind that Selenium by default raises 'clean' browser instances. 但是请记住,Selenium默认情况下会引发“干净”的浏览器实例。 So double-check that your current Chrome is with correct profile settings/desired capabilities. 因此,请仔细检查您当前的Chrome浏览器是否具有正确的配置文件设置/所需功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM