wttech/bobcat

Unable to run test in Selenium Grid

mohitrathi92 opened this issue · 1 comments

Environment

Bobcat version: 2.3.0

Bobcat modules used:

  • bb-core
  • bb-junit
  • bb-junit5
  • bb-aem-65
  • bb-aem-core

Browser + version:
Latest

Expected Behavior

When executing a single test on the selenium grid without specifying the browser name it should launch on the available browsers

Actual Behavior

When executing a single test on the selenium grid without providing the browser cap it is not getting executed.

Steps to reproduce

To execute a single test in cross-browser we are running our test in selenium grid but when providing two browser names it overwrites one of the browsers (which is expected).

How should I proceed with running a test in two browsers with selenium grid?

I'm facing a similar issue.

config.yml

default:
  properties:
    proxy.enabled: false
    proxy.ip: 127.0.0.1
    proxy.port: 9000
    page.title.timeout: 30
    allure.report: false
    allure.create.enviroment: false
    timings.implicitTimeout: 10
  contexts: [remote]

remote.yml

remote:
  webdriver.type: remote
  webdriver.url: http://localhost:4444/wd/hub
  webdriver.cap.browserName: chrome
  webdriver.cap.platform: macOS
  webdriver.cap.screenResolution: 2360x1770
  webdriver.cap.maxInstances: 2
  webdriver.cap.build: DemoBuild
  webdriver.cap.name: Demo

Test class - the default that gets generated

@Modules(BobcatRunModule.class)
public class WikipediaTest {

  private static final String SEARCH_QUERY = "hello world";
  private static final String HEADING = "\"Hello, World!\" program";

  @Inject
  private BobcatPageFactory bobcatPageFactory;

  @Inject
  private DefinitionPage definitionPage;

  @Test
  public void wikipediaSearchTest() {
    WikipediaPage homePage = bobcatPageFactory.create("https://en.wikipedia.org", WikipediaPage.class);
    homePage.open().getSearchComponent().searchForQuery(SEARCH_QUERY);
    assertThat(definitionPage.getHeading(), is(HEADING));
  }
}

This opens up chrome and the test runs. But how to run the same test on both chrome and firefox parallel.