How to set browser language as English through selenium java - selenium-webdriver

I am trying to run my test which is running on VM machine located at France through Azure Devops Pipeline.
Now I have applied all my locator strategy to find elements as per English language because in local browser, the language is English.
I tried couple of options like ```
case "Chrome":
ChromeOptions chromeOptions=new ChromeOptions();
//chromeOptions.addArguments("--headless");
chromeOptions.addArguments("−−lang=en-US");
but still this doesn't change the browser language

chromeOptions.addArguments("−−lang=en");
Based on definition:
--lang ⊗ The language file that we want to try to open. Of the form language[-country] where language is the 2 letter code from ISO-639.
See https://peter.sh/experiments/chromium-command-line-switches/

Related

ask cli generates language models many languages, how can I just do en-US?

I created a project using the ask cli as follows:
ask new --skill-name my-new-skill
It created a number of language models in models. I deleted all but, en-US.json and ran:
ask deploy
However in the Alexa developer console, I see language models created for German, variations of English, Hindi etc. How can I tell the ask cli I only want en-US at this time?
I figured out the answer. Remove the entries from skill.json

CakePHP - Language not recognized

When I run the website built on CakePHP on a local server, it shows the correct, non-english version. However, if I run it on a server it shows the english version. I can manually set the language in core.php, but I want CakePHP to one of the two versions depending on the user's language.
How can I manage that?
With kind regads,
Battlestr1k3
Here's a good article on this topic:
https://www.dyeager.org/blog/2008/10/getting-browser-default-language-php.html
Which basically says you can use $_SERVER['HTTP_ACCEPT_LANGUAGE'] [details here] to determine the language. At that point, you'll have to follow the standard Cake procedures to change your app's language based on which language you detect.

Changing the language of Master Data Services

Yesterday, I installed and configured Master Data Services (after installing IIS and other required components). At no point during the installation did I get the option to pick a language (and if I did, I might have overlooked it).
When checking the web application, it seems to have defaulted to Danish language (possibly because that's the language Windows runs in?). Is there any way for me to change the language of Master Data Services anywhere?
Thanks!
Well, this is certainly embarrassing.
Control Panel -> Clock, Language, and Region -> Language
Danish was shown on top. Select it, then click Move down so English is the default:
Restart Internet Explorer, point it t the MDS application and bob was my uncle:

Is it possible to record custom metrics to an app with another secondary agent?

We are running Elasticsearch with the NewRelic Java agent installed. We want to record custom metrics without changing anything in ES.
I know the NewRelic proposed way to do this is Steven Eksteens Elasticsearch Plugin but it's Ruby based and we try to avoid adding another language to our stack. I tried to replicate Stevens efforts in Python, using the NewRelic Python agent and the newrelic.agent.record_custom_metric function:
import newrelic.agent
from time import sleep
import logging
logger = logging.getLogger()
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
# generate config file with 'newrelic-admin generate-config <apicode> newrelic.ini'
newrelic.agent.initialize('newrelic.ini')
application_str = dict(newrelic.agent.newrelic.core.config.global_settings())["app_name"]
application = newrelic.agent.register_application(application_str)
while True:
newrelic.agent.record_custom_metric('Custom/Value', 1, application)
sleep(10)
This works fine. Only problem: If configured to use the same app_name as the existing java-agent controlled App it registers a new app in NewRelic with the appendix '(Python)'. What I want is to add the metrics to the original one. Is this possible?
Applications in the New Relic Dashboard have to be the same language to be consolidated. Otherwise you will end up with multiple applications with the same name and an appended language name due to the type of metrics and manner of reporting in different languages.
There is no way to consolidate two applications of the same name written in different languages in your New Relic account. You could however create a custom dashboard which will allow you to place charts from multiple applications in one dashboard.

Available languages in "Manage Website Languages" on EPiServer

EPiServer ONLY:
I'm trying to add Greenlandic to an existing website. On my local development machine, the language is available as "kalaallisut (Kalaallit Nunaat) kl-GL", but when I try enable the same language our on staging server, the language is not available in the list shown on the "Manage Website Languages" screen.
I've also noticed "kalaallisut kl" was availble on my local machine on another site, but not for the site I'm working on now.
What determines which languages are available and how do I enable Greenlandic on our staging server?
EPiServer displays the languages available/registered on the machine, and that depends on the OS. You can check this page to see which languages are available by default.
You can register the language yourself, see this page on MSDN. You didn't mention which version of EPiServer you're running, so I'm assuming 6/7. In that case on way to register the language is through an initialization module, see this page on EPiServer World - making sure that the language will be available on all machines/servers.

Resources