Setup for IE6 (and multiple browsers) in Selenium Grid

It's hard for me to try to understand some concepts of selenium Grid / RC. I need to provide specific tests (ie6-on-xp, ie7-on-xp, etc.). For what I read, the browser line in grid_configuration.ymldoes not make any reference to which version MSIEor FirefoxI am running. Therefore, I can’t lower my head, in what form can I tell Grid / RC that I need certain browsers and the way to launch them (how does RC know which exe to run?)

Secondly, I would like to run portable versions of these browsers. I saw only what is indicated in the tests, and not on the RC command line to run them. Is this a way to do this for every test?

+3
source share
2 answers

I will answer your question by breaking the information you need.

I need to provide specific environments (i.e. 6-on-xp, ie7-on-xp, etc.).

Well, since you cannot have multiple instances of IE on the same computer, I know that there are applications that allow you to do this, but in my experience they cause more problems than solving them. Ideally, you want different machines to run tests. By doing this, you also create a selenium farm for your developers, because they can target the test to a specific instance. Therefore, configuring the Grid as an infrastructure is a good step.

, , grid_configuration.yml , MSIE Firefox . Grid/RC, , ( RC , exe ?)

YAML , . , . Se: GRID, Se: RC, , , RC-, , .

, , . , . , XPath CSS- , -, , .

, , - . # app.config,

Config

<Firefox>
 <addKey browserVersion='3.5.6' OS='WindowsXP'>
</Firefox>

, 1

 public class BoothElement : ConfigurationElement
    {
        [ConfigurationProperty("browserVersion", DefaultValue = "", IsKey = true, IsRequired = true)]
        public string browserVersion
        {
            get
            {
                return ((string)(base["browserVersion"]));
            }
            set
            {
                base["browserVersion"] = value;

            }
        }

selenium = new DefaultSelenium(HubPort, HubPort, browserVersion, SUTServer);
selenium.Open("/test.htm");
//Rest of the test

python , .

include.py

hubServer = 'hub'
hubPort = 5555
sut = 'http://serverUnderTest'
firefox = [hubServer,hubPort,"\*chrome",sut]
iexplore = [hubServer,hubPort,"\*iehta",sut]

test.py

sel = selenium(firefox)
sel.open("/test.html")
#rest of the test

Selenium Grid , , .

-, . , , RC . , ?

Selenium , , Selenium 2, , Android .

   - name:    "Firefox on OS X"
     browser: "*firefox"
   - name:    "Firefox on Linux"
     browser: "*firefox"
   - name:    "IE on Windows"
     browser: "*iehta"
   - name:    "Safari on OS X"
     browser: "*safari"

, , , YAML * firefox. , , ,

selenium.Start(hubHost, hubPort, "Firefox on Linux", "http://serverUnderTest"); selenium.Start(hubHost, hubPort, "Firefox on OS X", "http://serverUnderTest");

* firefox . * firefox, , , , .

+6

"" .

+1

Source: https://habr.com/ru/post/1726309/


All Articles