New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker drone is expecting the wrong responseCode for Selenium 3.4.0 #736

Closed
jollytoad opened this Issue Jun 15, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@jollytoad

jollytoad commented Jun 15, 2017

Docker-Drone fails to detect that selenium-chrome-debug has started with Selenium 3.4.0.
In

the await is set to expect a response code of 403, but it seems that may no longer be the case in 3.4.0, instead you get a 200.

I also can't seem to override the await in the arquillian.xml docker configuration

After setting a breakpoint on that line and manually overriding the responseCode via the debugger, it seems to work.

@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Jun 15, 2017

Member

Thank you so much, yes in case of drone integration, you cannot configure it in arquillian.xml. PRs are more than welcome would you like to send a PR just fixing this? The thing is that should be something like if seleniumVersiion is < 3.5.0 then use 403 else 200.

Member

lordofthejars commented Jun 15, 2017

Thank you so much, yes in case of drone integration, you cannot configure it in arquillian.xml. PRs are more than welcome would you like to send a PR just fixing this? The thing is that should be something like if seleniumVersiion is < 3.5.0 then use 403 else 200.

@lordofthejars lordofthejars added the bug label Jun 15, 2017

@lordofthejars lordofthejars added this to the 1.6.1 milestone Jun 15, 2017

@jollytoad

This comment has been minimized.

Show comment
Hide comment
@jollytoad

jollytoad Jun 16, 2017

I'm not sure exactly which version of Selenium this changed in, and unfortunately don't have time to investigate atm.

I managed to override with an extension for the time being...

public class CubeDroneHackExtension implements LoadableExtension {
    @Override
    public void register(LoadableExtension.ExtensionBuilder extensionBuilder) {
        extensionBuilder.observer(CubeDroneHack.class);
    }
}
public class CubeDroneHack {
    @Inject
    @ApplicationScoped
    InstanceProducer<SeleniumContainers> seleniumContainersInstanceProducer;

    public void install(@Observes(precedence = 80) CubeDockerConfiguration configuration) {
        seleniumContainersInstanceProducer.get().getSeleniumContainer().getAwait().setResponseCode(200);
    }
}

jollytoad commented Jun 16, 2017

I'm not sure exactly which version of Selenium this changed in, and unfortunately don't have time to investigate atm.

I managed to override with an extension for the time being...

public class CubeDroneHackExtension implements LoadableExtension {
    @Override
    public void register(LoadableExtension.ExtensionBuilder extensionBuilder) {
        extensionBuilder.observer(CubeDroneHack.class);
    }
}
public class CubeDroneHack {
    @Inject
    @ApplicationScoped
    InstanceProducer<SeleniumContainers> seleniumContainersInstanceProducer;

    public void install(@Observes(precedence = 80) CubeDockerConfiguration configuration) {
        seleniumContainersInstanceProducer.get().getSeleniumContainer().getAwait().setResponseCode(200);
    }
}
@georgwolf

This comment has been minimized.

Show comment
Hide comment
@georgwolf

georgwolf Jul 18, 2017

Contributor

The behaviour has been changed with Selenium 3.x.
I created pull request #760 for fixing this.

Contributor

georgwolf commented Jul 18, 2017

The behaviour has been changed with Selenium 3.x.
I created pull request #760 for fixing this.

georgwolf added a commit to georgwolf/arquillian-cube that referenced this issue Jul 18, 2017

lordofthejars added a commit that referenced this issue Jul 18, 2017

Fix for #736: Expect response code 200 for Selenium containers versio…
…n >= 3 (#760)

* Fix for #736: Expect response code 200 for Selenium containers version 3
onwards

* Fix for #736: get used Selenium version from classpath and extracted
logic to dedicated method

* Inlined expected response code

* Removed unnecessary line break

@lordofthejars lordofthejars added this to the 1.7.1 milestone Jul 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment