-
Notifications
You must be signed in to change notification settings - Fork 40
Support for Applitools Eyes #174
Comments
Further info ! I just tried only adding a dependency
To my project , and with out doing any code change what so ever existing bobcat scenarios don't run ... It was only just simply adding a dependency that breaks existing scenarios that run fine before it as added! the error message is again same as below! hope that is a clue , can some one help why ?
|
Hi, @yohannesalazar! Regarding your error, it seems like a problem with Appium dependencies: I've integrated Applitools Eyes with Bobcat couple months ago as part of a PoC, though I was using version 1 of their SDK, which required using wrapped WebDriver instance. To achieve that, we actually improved Bobcat to be more extendable - as one of the steps, you had to implement Let us know if the above will solve your problems. I'm more than happy to help you out in integrating Eyes with our cat ;) |
Hi Michał , Thanks for that and will give it a go based on your advise and will let you know how it goes:) |
Hi Michał, I had some time today to look at this , and thanks removing the dependency was one step foreword.. The error I am getting now is something like
then I tried to add this also has error
My code looks like
What it does is open two browsers , one with blank url only "data:," on url as selenium opens the page and the other have publishUrl but does not do anything , it looks like both bobcat and eye are opening one browser each ???? |
Hi Bobcat star .. any update on this question ? |
Hi @yohannesalazar, sorry for late response! I've investigated the issue and the problem is that Eyes require a Fortunately, we can instantiate Eyes before the wrapping is done (this capability was actually introduced as a result of the previous Eyes POC :)). The following is an example of how can this be achieved using public class EyesModifier implements WebDriverModifier {
@Inject
private Eyes eyes;
@Override
public boolean shouldModify() {
return true;
}
@Override
public WebDriver modify(WebDriver webDriver) {
return eyes.open(webDriver, "APP_NAME", "TEST_NAME");
}
} and for providing the @ThreadScoped
public class EyesProvider implements Provider<Eyes> {
private static final String API_KEY = "YOUR_API_KEY"; //or better, use properties for this
private Eyes cachedEyes;
@Override
public Eyes get() {
if (cachedEyes == null) {
cachedEyes = new Eyes();
}
return cachedEyes;
}
private Eyes create() {
Eyes eyes = new Eyes();
eyes.setApiKey(API_KEY);
//here you can apply other settings for Eyes
return eyes;
}
} The above classes require following changes in your project's Guice module: Multibinder<WebDriverModifier> webDriverModifiers = Multibinder.newSetBinder(binder(), WebDriverModifier.class);
webDriverModifiers.addBinding().to(EyesModifier.class);
bind(Eyes.class).toProvider(EyesProvider.class); Unfortunately, this leaves you with a problem that I've encountered during that initial POC: obtaining/generating the test name so it can be used during initialization. |
Hi Michał, I have changed my project for a few sprints and back on my this project again , sorry did not see that you have responded to this issue on appliTools ... I will be looking at it soon and follow your advice and solution ... Many Thanks and will let you know when this task is picked.. |
@mkrzyzanowski Can you pl prioritize this PR. We are planning to do a POC on Applitools in this quarter. |
@mkrzyzanowski Any ETA to merge the Aplitools module? |
1 similar comment
@mkrzyzanowski Any ETA to merge the Aplitools module? |
Hi Bobcat stars,
Am looking to integrate to Applitools for UI comparison...
can some one point me on which class I need to instantiate the webDriver as per Applitools example code below ?
I tried to do it within my projects like
` @Inject
private Eyes eyes;
@Inject
private WebDriver webDriver;
public LandingPage open() {
eyes.setApiKey("cR99frVt2NBrYG3NYaS9Xasasasas100N20CId5JI110");
eyes.open(webDriver, "Hello World!", "My first Appli Selenium Java test!",
new RectangleSize(800, 600));
webDriver.get("http://www.bbc.co.uk/");`
But got error
cucumber.runtime.CucumberException: Failed to instantiate public cucumber.runtime.java.JavaBackend(cucumber.runtime.io.ResourceLoader) with [cucumber.runtime.io.MultiLoader@13d9b21f]
Looks like I need it to be added at bobcat level rather than my project , so please if you could direct me as you may have done POC already
Below the hello world example that works non-bobcat plain selenium
The text was updated successfully, but these errors were encountered: