saucelabs-training / demo-java Goto Github PK
View Code? Open in Web Editor NEWA repository containing examples using Java with Sauce Labs
License: MIT License
A repository containing examples using Java with Sauce Labs
License: MIT License
We should not require the user the enter a SCREENER_API_KEY to setup the demo repo. This is in the README.
$ export SAUCE_USERNAME="your username"
$ export SAUCE_ACCESS_KEY="your accessKey"
$ export SCREENER_API_KEY="your screener key"
Why did we choose to do the testing strategy for the best-practice
and what benefits comes from each strategy.
What does each coverage gap cover?
What are the benefits / what are the disadvantages?
See this as an example https://github.com/saucelabs-training/demo-csharp/tree/main/DotnetCore/Sauce.Demo/Core.BestPractices.Web and put into https://github.com/saucelabs-training/demo-java/tree/main/best-practice
Also add a requirement for this to the CONTRIBUTING.MD
A framework example for https://github.com/saucelabs-training/demo-java/tree/main/best-practice-mobile-native needs to exist.
After some inspection, it appears that the GitHub Actions pipelines only run against ubuntu-latest
. While this is necessary it it not sufficient as some users also use Windows and Mac platforms for these code examples.
This guide show the other platforms offered by GitHub Actions and it would be helpful to have runs against Windows and Mac environments.
Hi Team
Could you please help me in hardclosing the app and relaunching the application in a single session
Regards
Adarsh BP
Hi team , could you please guide me on implementing biometric authentication using Java code.l, I went through your repo but found the code in java script , could you please help me using Java
Please remove Circle CI from our automated tests so it doesn't run
Readme has some links that are broken.
In the Most Popular section the following links all result in 404
Please fix them or let me know how I can help in fixing them ๐
Right now the bindings does not work with selenium 4.3.0
With this bindings: com.saucelabs:saucebindings-junit5:1.0.0
I get an error:
`java.lang.ClassCastException: class com.saucelabs.saucebindings.Browser cannot be cast to class java.lang.String (com.saucelabs.saucebindings.Browser is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
at org.openqa.selenium.remote.session.ChromeFilter.apply(ChromeFilter.java:31)
at org.openqa.selenium.remote.CapabilitiesUtils.lambda$makeW3CSafe$0(CapabilitiesUtils.java:90)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.openqa.selenium.remote.CapabilitiesUtils.makeW3CSafe(CapabilitiesUtils.java:100)
at org.openqa.selenium.remote.CapabilitiesUtils.makeW3CSafe(CapabilitiesUtils.java:72)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
at java.base/java.util.Collections$2.tryAdvance(Collections.java:4747)
at java.base/java.util.Collections$2.forEachRemaining(Collections.java:4755)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.openqa.selenium.remote.DriverCommand.NEW_SESSION(DriverCommand.java:194)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:264)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:179)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:161)
at com.saucelabs.saucebindings.SauceSession.createRemoteWebDriver(SauceSession.java:59)
at com.saucelabs.saucebindings.SauceSession.start(SauceSession.java:42)
at com.saucelabs.saucebindings.junit5.SauceBaseTest.setUp(SauceBaseTest.java:44)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeEachMethod(TimeoutExtension.java:76)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeMethodInExtensionContext(ClassBasedTestDescriptor.java:506)
)`
It looks like the versions are incompatible.
If you need more informations please let me know.
Move any junit5 examples into a module for selenium-junit5-examples
Make sure CI exists for at least one test to make sure that Junit5 is working
We currently have a best-practice
folder but that really only works for web
A framework for mobile native apps would be separate and needs either a new module or a new package inside of best-practice
We have a folder called w3c-examples and I'm not 100% sure what to do with it. I see that there are Junit 5 examples and TestNg examples. I think it will be a matter of moving those examples into the right place. Maybe that's selenium-examples
? It's possible that we already have similar examples and w3c-examples
just needs to be deleted...
examples
module where all of the examples live, irrespective of the testing libraryhttps://github.com/saucelabs-training/demo-java/tree/master/parallel-testing needs to be moved to the right place. It looks like it's showing off cross-browser parallelization with TestNg in multiple ways. My assumption is that it just needs to be moved into selenium-testng-examples
. It's going here because it's specific to a testing library and likely requires a special pom.xml or another xml?
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
org.seleniumhq.selenium:selenium-support
, org.seleniumhq.selenium:selenium-remote-driver
, org.seleniumhq.selenium:selenium-api
, org.seleniumhq.selenium:selenium-java
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/best-practice.yml
actions/checkout v2
actions/setup-java v1
.github/workflows/gitpod.yml
actions/checkout v2
maven 3.6.3-jdk-11
.github/workflows/junit4.yml
actions/checkout v3
axel-op/googlejavaformat-action v3
actions/checkout v2
actions/setup-java v1
.github/workflows/mac-windows.yml
actions/checkout v2
actions/setup-java v1
.github/workflows/real-devices.yml
actions/checkout v2
actions/setup-java v1
.github/workflows/selenium-cucumber-examples.yml
actions/checkout v2
actions/setup-java v1
.github/workflows/selenium-examples.yml
actions/checkout v3
axel-op/googlejavaformat-action v3
actions/checkout v2
actions/setup-java v1
.github/workflows/testng.yml
actions/checkout v2
actions/setup-java v1
appium-junit4-cucumber-examples/pom.xml
io.cucumber:cucumber-java 7.3.3
io.cucumber:cucumber-junit 7.3.3
io.appium:java-client 9.0.0
appium/appium-app/appium-app-best-practice/pom.xml
org.testng:testng 7.5
org.assertj:assertj-core 3.10.0
io.appium:java-client 9.0.0
org.seleniumhq.selenium:selenium-api 4.14.1
org.seleniumhq.selenium:selenium-remote-driver 4.14.1
org.seleniumhq.selenium:selenium-support 4.14.1
org.apache.maven.plugins:maven-surefire-plugin 3.0.0-M4
appium/appium-app/appium-app-examples/pom.xml
commons-logging:commons-logging 1.2
org.assertj:assertj-core 3.10.0
io.appium:java-client 9.0.0
org.seleniumhq.selenium:selenium-api 4.14.1
org.seleniumhq.selenium:selenium-remote-driver 4.14.1
org.seleniumhq.selenium:selenium-support 4.14.1
org.apache.maven.plugins:maven-surefire-plugin 3.0.0-M5
appium/appium-web/appium-web-examples/pom.xml
commons-logging:commons-logging 1.2
org.assertj:assertj-core 3.10.0
io.appium:java-client 9.0.0
org.seleniumhq.selenium:selenium-api 4.14.1
org.seleniumhq.selenium:selenium-remote-driver 4.14.1
org.seleniumhq.selenium:selenium-support 4.14.1
org.apache.maven.plugins:maven-surefire-plugin 3.0.0-M5
best-practice/pom.xml
org.seleniumhq.selenium:selenium-api 4.14.1
org.seleniumhq.selenium:selenium-java 4.14.1
io.appium:java-client 9.0.0
gitpod/pom.xml
com.saucelabs:saucebindings-junit5 1.0.0
org.seleniumhq.selenium:selenium-java 4.14.1
io.appium:java-client 9.0.0
org.apache.maven.plugins:maven-surefire-plugin 3.0.0-M5
pom.xml
com.saucelabs:saucebindings-junit4 1.0.1
org.apache.maven.plugins:maven-surefire-plugin 3.0.0-M5
com.saucelabs:sauce_bindings 1.2.0
org.seleniumhq.selenium:selenium-java 4.14.1
org.apache.maven.plugins:maven-compiler-plugin 3.0
org.apache.maven.plugins:maven-surefire-plugin 3.0.0-M5
com.saucelabs:saucebindings-testng 1.0.0
org.apache.maven.plugins:maven-surefire-plugin 3.0.0-M5
selenium-cucumber-examples/pom.xml
io.cucumber:cucumber-java 7.17.0
io.cucumber:cucumber-picocontainer 7.17.0
io.cucumber:cucumber-testng 7.17.0
org.testng:testng 7.10.0
commons-io:commons-io 2.16.1
org.apache.maven.plugins:maven-resources-plugin 3.3.0
org.apache.maven.plugins:maven-resources-plugin 2.7
selenium-examples/pom.xml
org.seleniumhq.selenium:selenium-java 4.18.1
org.junit.jupiter:junit-jupiter-engine 5.10.2
com.deque.html.axe-core:selenium 4.8.2
com.titusfortner:selenium-logger 2.4.0
com.github.blibli-badak:selenium-har-util 1.0.9
org.apache.maven.plugins:maven-surefire-plugin 3.1.2
selenium-junit4-examples/pom.xml
com.saucelabs:saucebindings-junit4 1.0.1
org.seleniumhq.selenium:selenium-java 4.14.1
com.titusfortner:selenium-logger 2.4.0
org.apache.maven.plugins:maven-surefire-plugin 3.1.2
selenium-testng-examples/pom.xml
selenium3-examples/pom.xml
com.saucelabs:saucebindings-junit5 1.0.0
org.seleniumhq.selenium:selenium-java 3.141.59
org.apache.maven.plugins:maven-surefire-plugin 3.0.0-M5
training-sessions/advanced_demo/pom.xml
io.github.bonigarcia:webdrivermanager 4.0.0
junit:junit 4.12
com.saucelabs:salsa_verde 0.1.0
training-sessions/synchronization/pom.xml
com.saucelabs:salsa_verde 0.1.0
junit:junit 4.12
@titusfortner can you please add your Junit 5 Test Watcher example to the selenium-junit5-examples
module?
You can follow the instructions in the CONTRIBUTING.md
And then just make it visible on the root README.md so users can find it
Please update the contributing documents to be clean and organized based on our standards
Add them somewhere to be clearly visible in our main README
The biometric auth examples are really complicated and there is a lot going on. I actually don't understand what's happening. Is it possible to simplify the examples and update the README for those examples?
You can show how to run with TestNg or Maven
https://github.com/saucelabs-training/demo-java/tree/master/on-boarding-modules needs to be moved to the right place. The docs that come with that are nice and might be worth keeping if they are still up to date.
Add Nikolay's youtube video on parallelization with junit + testng
I moved code related to Cucumber into this selenium-examples-cucumber
module but not sure if it works. We need to:
Hello,
Since selenium v4.1.2 onward, ClientConfig.connectionTimeout(Duration) is no longer available. You might want to update your test example (ie. RemoteWebDriverBuilderTest).
Cheers,
Harry
Move all examples from https://github.com/saucelabs-training/demo-java/tree/main/selenium-junit4-examples
Make sure that all of the examples are running on Junit4
Make sure that CICD works accordingly
Delete /selenium-junit4-examples
There is a parallel-testing folder that has some code. Where do we place it in our hierarchy?
@c3ccl3ston there are a few examples remaining in the java8
folder, can you please help us move those to the right places?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.