Concise UI Tests with Java!

Related tags

Testing selenide
Overview

Selenide = UI Testing Framework powered by Selenium WebDriver

Build Status Maven Central MIT License Free

Join the chat at https://gitter.im/codeborne/selenide Присоединяйся к чату https://gitter.im/codeborne/selenide-ru Follow Slack chat Слак чат Telegram чат

What is Selenide?

Selenide is a framework for writing easy-to-read and easy-to-maintain automated tests in Java. It defines concise fluent API, natural language assertions and does some magic for ajax-based applications to let you focus entirely on the business logic of your tests.

Selenide is based on and is compatible to Selenium WebDriver 4.0+

@Test
public void login() {
  open("/login");
  $(By.name("user.name")).setValue("johny");
  $("#submit").click();
  $("#username").shouldHave(text("Hello, Johny!"));
}

Look for detailed comparison of Selenide and Selenium WebDriver API.

Changelog

Here is CHANGELOG

How to start?

Just put selenide.jar to your project and import the following methods: import static com.codeborne.selenide.Selenide.*;

Look for Quick Start for details.

Resources

FAQ

See Frequently asked questions

Posts

Contributing

Contributions to Selenide are both welcomed and appreciated. See CONTRIBUTING.md for specific guidelines.

Feel free to fork, clone, build, run tests and contribute pull requests for Selenide!

Authors

Selenide was originally designed and developed by Andrei Solntsev in 2011-2021 and is maintained by a group of enthusiast.

Thanks

Many thanks to these incredible tools that help us creating open-source software:

Intellij IDEA YourKit Java profiler BrowserStack

License

Selenide is open-source project, and distributed under the MIT license

Comments
  • NoSuchElementException thrown, but ElementNotFound must be catched

    NoSuchElementException thrown, but ElementNotFound must be catched

    The Problem: If it is tried to select a not listed option, then I want to handle the occuring error. The stack trace says the problem is "Caused by: NoSuchElementException". I know, that I have to catch the "org.openqa.selenium.NoSuchElementException", but both are not catched, nor even "Exception" is catched. I see that selenide calls throwElementNotFound().

    The Workaround: I have to catch "ElementNotFound" to handle this.

    The Code:

    SelenideElement select = $(By.name("domainsetId"));
            try {
                select.selectOption("ERROR");
            } catch (org.openqa.selenium.NoSuchElementException | NoSuchElementException ex) {
                System.out.println("Not found");
                return false;
            }
    

    The failure trace:

    Element not found {by text: ERROR}
    Expected: visible
    Screenshot: file:/home/XXX/git/selenium/Screenshots/1441620116678.0.png
    Timeout: 4 s.
    Caused by: NoSuchElementException: no such element
        at com.codeborne.selenide.impl.AbstractSelenideElement.throwElementNotFound(AbstractSelenideElement.java:601)
        at com.codeborne.selenide.impl.WaitingSelenideElement.throwElementNotFound(WaitingSelenideElement.java:75)
        at com.codeborne.selenide.impl.AbstractSelenideElement.waitUntil(AbstractSelenideElement.java:593)
        at com.codeborne.selenide.impl.AbstractSelenideElement.should(AbstractSelenideElement.java:411)
        at com.codeborne.selenide.impl.AbstractSelenideElement.should(AbstractSelenideElement.java:406)
        at com.codeborne.selenide.impl.AbstractSelenideElement.invokeShould(AbstractSelenideElement.java:243)
        at com.codeborne.selenide.impl.AbstractSelenideElement.dispatch(AbstractSelenideElement.java:120)
        at com.codeborne.selenide.impl.AbstractSelenideElement.invoke(AbstractSelenideElement.java:55)
        at com.codeborne.selenide.impl.WaitingSelenideElement.invoke(WaitingSelenideElement.java:19)
        at com.sun.proxy.$Proxy4.shouldBe(Unknown Source)
        at com.codeborne.selenide.impl.AbstractSelenideElement.selectOptionByText(AbstractSelenideElement.java:488)
        at com.codeborne.selenide.impl.AbstractSelenideElement.dispatch(AbstractSelenideElement.java:169)
        at com.codeborne.selenide.impl.AbstractSelenideElement.invoke(AbstractSelenideElement.java:55)
        at com.codeborne.selenide.impl.WaitingSelenideElement.invoke(WaitingSelenideElement.java:19)
        at com.sun.proxy.$Proxy4.selectOption(Unknown Source)
        at com.COMPANY.qm.smgw.MessengerManager.selectMandator(MessengerManager.java:129)
        at com.COMPANY.qm.smgw.msg.MessengerManagerTest.test_selectMandator(MessengerManagerTest.java:81)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
    
    not a bug 
    opened by crocodilechris 41
  • How to make ElementsContainer works?

    How to make ElementsContainer works?

    My selenide version is the latest, and I need to introduce ElementsContainer for my testing, from my study of ElementsContainer in simple, but it fail, looks like ElementsContainer is not straightforward to use, my codes as below:

    public class SearchPage {
    
        @FindBy(css = "div[class='RNNXgb']")
        public SearchBlock searchBlock;
    
        public void open() {
            Selenide.open("https://www.google.com");
        }
    
        public void search(String text) {
            searchBlock.searchInput.val(text).pressEnter();
        }
    
        static class SearchBlock extends ElementsContainer {
            SelenideElement searchIcon
                    = $("div[class='hsuHs']");
            SelenideElement searchInput
                    = $(By.name("q"));
            SelenideElement voiceIconBtn
                    = $("div[class='hpuQDe']");
        }
    
    }
    

    My testing code:

    public void f2() {
            SearchPage page = new SearchPage();
            page.open();
            page.search("selenide");
    }
    

    finally, I got the error as below. image

    As less error message from the exception, so I don't know how to fix, could someone advise how to fix it?

    Thanks

    question element-containers 
    opened by ansonliao 39
  • displayed:false on visible elements

    displayed:false on visible elements

    Hi! While testing the Selenide API I found a case using the default Firefox Driver (using Firefox 39.0 on OS X Yosemite) where a plainly visible element on the page fails to be interacted with as Selenide believes it isn't displayed.

    ! com.codeborne.selenide.ex.ElementShould: Element should be visible {By.name: session[username_or_email]}
    ! Element: '<input autocomplete="on" class="js-username-field email-input js-initial-focus" name="session[username_or_email]" type="text" displayed:false></input>'
    

    gets thrown when the following code is run:

    open("https://twitter.com/login/");
    $(By.name("session[username_or_email]")).val("name");
    $(By.name("session[password]")).setValue("password");
    $(".submit").click();
    
    has pr 
    opened by zolrath 33
  • Collection filtering by visibility

    Collection filtering by visibility

    The problem

    Filtering collection by visibility and then clicking on the first visible element throws exception 'Element should be visible'

    Details

    Given page elements:

    public ElementsCollection tooltipIcons = $$(".icon-info").filter(visible);
    public SelenideElement tooltipIcon = tooltipIcons.first();
    

    When I call tooltipIcon.click() I will get an exception saying that element is not visible; In reality it checks the first element from unfiltered collection, which is indeed invisible in my case. Works fine with 4.9. Looks like filter(visible) does not actually do anything.

    Tell us about your environment

    • Selenide Version: 4.10.01

    UPDATE: Looks like it works the first time, but once element visibility changes and I try to access element via the same page object reference the filtering is not re-triggered and it's trying to access the same element as before, which is not visible anymore.

    cannot preproduce waiting-for-author 
    opened by pavelpp 30
  • Can't use SelenideElement if it was declared before setWebDriver() method

    Can't use SelenideElement if it was declared before setWebDriver() method

    The problem

    As per issue title, declaring a SelenideElement before calling WebDriverRunner.setWebDriver(driver) method leads to an IllegalStateException whenever user tries to interact with the element.

    Details

    If we do not use setWebDriver method, then everything works regardless of where you declare SelenideElement. It can be a test class field for instance and still works. Exception stacktrace

    java.lang.IllegalStateException: Webdriver has been closed. You need to call open(url) to open a browser again.
    
    	at com.codeborne.selenide.drivercommands.LazyDriver.getWebDriver(LazyDriver.java:65)
    	at com.codeborne.selenide.impl.ElementFinder.getSearchContext(ElementFinder.java:86)
    	at com.codeborne.selenide.impl.ElementFinder.getWebElement(ElementFinder.java:74)
    	at com.codeborne.selenide.impl.WebElementSource.checkCondition(WebElementSource.java:47)
    	at com.codeborne.selenide.commands.Should.should(Should.java:35)
    	at com.codeborne.selenide.commands.Should.execute(Should.java:29)
    	at com.codeborne.selenide.commands.Should.execute(Should.java:12)
    	at com.codeborne.selenide.commands.Commands.execute(Commands.java:144)
    	at com.codeborne.selenide.impl.SelenideElementProxy.dispatchAndRetry(SelenideElementProxy.java:99)
    	at com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:65)
    	at com.sun.proxy.$Proxy5.shouldBe(Unknown Source)
    

    Tell us about your environment

    • Selenide Version: 5.0.1
    • Chrome\Firefox\IE Version: irrelevant
    • Browser Driver Version: irrelevant
    • Selenium Version: 3.x
    • OS Version: irrelevant

    Code To Reproduce Issue [ Good To Have ]

    Easily reproducible with:

            SelenideElement a=$("abc");
            WebDriverRunner.setWebDriver(new ChromeDriver());
            open("http://google.com");
            a.shouldNot(exist);
    

    And this way it works

            WebDriverRunner.setWebDriver(new ChromeDriver());
            SelenideElement a=$("abc");
            open("http://google.com");
            a.shouldNot(exist);
    

    Also this works

    public class SimpleTest {
    
        public SelenideElement search = $(By.name("q"));
    
        @Test
        public void testSimple() {
            open("https://www.google.com");
            search.shouldBe(Condition.visible);
        }
    
    }
    

    And this does not

    public class SimpleTest {
    
        public SelenideElement search = $(By.name("q"));
    
        @Test
        public void testSimple() {
            WebDriverRunner.setWebDriver(new ChromeDriver(new ChromeOptions()));
            open("https://www.google.com");
            search.shouldBe(Condition.visible);
        }
    }
    
    not a bug 
    opened by pavelpp 29
  • Add an option for mobile emulation

    Add an option for mobile emulation

    The problem

    We often want to open browser in "mobile emulation" mode. We would like to have an option in Selenide to do it easily.

    Details

    Currently we have to implement own WebdriverProvider to add this option:

      Map<String, String> mobileEmulation = new HashMap<>();
      mobileEmulation.put("deviceName", "Nexus 5");
      ChromeOptions chromeOptions = new ChromeOptions();
      chromeOptions.setExperimentalOption("mobileEmulation", mobileEmulation);
    

    See https://chromedriver.chromium.org/mobile-emulation

    feature not sure 
    opened by asolntsev 28
  • 865 aliases for kotlin

    865 aliases for kotlin

    Proposed changes

    • add find, findX, findAll, findAllX methods in Selenide class
    • deprecate Selenide.getElement* methods as they are the same as find* and they don't follow naming convention from SelenideDriver or SelenideElement

    https://github.com/selenide/selenide/issues/865

    Checklist

    • [ ] Checkstyle and unit tests pass locally with my changes by running gradle check chrome htmlunit command - there are error not related with this change
    • [x] I have added tests that prove my fix is effective or that my feature works
    • [ ] I have added necessary documentation (if appropriate)
    feature has pr 
    opened by jkromski 26
  • Some of Configuration.browserCapabilities are lost

    Some of Configuration.browserCapabilities are lost

    Are not added capabilities chrome Selenide: 4.10

    Examle code:

    @BeforeSuite
    public void setUp() {
      ChromeOptions chromeOptions = new ChromeOptions();
      chromeOptions.addArguments(("load-extension=C:\Users\extension"));
      chromeOptions.addExtensions(new File("/path/to/extension.crx"));
      Configuration.browserCapabilities = new DesiredCapabilities();
      Configuration.browserCapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
      Configuration.browser = (getPropertyConfig("browser"));
    }
    

    @BorisOsipov 11:09: @VadimGulich да проблема есть, сделаешь ишью на гитхабе?

    @VadimGulich 11:09: @BorisOsipov Да, сделаю

    bug 🐛 has pr 
    opened by VadimGulich 25
  • Tests performance are dramatically dropped since Selenide version 3.10

    Tests performance are dramatically dropped since Selenide version 3.10

    I've been using Selenide version 3.9.3 in my project for a while. Recently I decided to bump Selenide to the last new version (currently it is 4.2). But after some tests run I noticed in Allure report that tests performance are dramatically dropped in that Selenide version. After some investigation (roll back to some low versions, checking tests performance there), I found out that starting from Selenide version 3.9.10 tests performance are really dropped. All these experiments were conducted on the same tests environments, the same version of app, the same tests were run (smoke scope of tests with paralleling) and only Selenide version was different (you can see difference in two attaches I provided below). It looks like some changes were made in Selenide version 3.9.10 which lead to tests performance dropping (probably during fixing the issue #401 where were added synchronized on execute method of every command). Could you please take a look at this one? Would it be the reason of that performance dropped?

    Attach 1 - Selenide version 3.9.3 - good tests performance

    selenide_3 9 3

    Attach 2 - Selenide version 3.9.10 or higher - poor tests performance

    selenide_3 9 10_or_higher help wanted 
    opened by slipwalker 25
  • Add file downloading mechanism without

    Add file downloading mechanism without "href"

    Sometimes file download starts without clicking link with "href" attribute. Selenide could provide way to download those files too.

    I guess it's only possible to do using proxy server (like browsermob-proxy).

    feature downloading files 
    opened by asolntsev 25
  • Implement #196 Add file downloading mechanism without

    Implement #196 Add file downloading mechanism without "href"

    @asolntsev please review first version of implementation #196 issue.

    How to use in end-user projects:

            Selenide.prepareDownload("C:\\SomeFolder", "", "application/x-sdlc");
            WebDriverRunner.getWebDriver().get("http://javadl.sun.com/webapps/download/AutoDL?BundleId=113227");
            // Downloaded file with name chromeinstall-8u66.exe
            File tmp = new File(Selenide.$(By.tagName("body")).getText());
    

    or

            Selenide.prepareDownload("C:\\SomeFolder","SomeFile.exe","application/x-sdlc");
            WebDriverRunner.getWebDriver().get("http://javadl.sun.com/webapps/download/AutoDL?BundleId=113227");
            // Downloaded file with name SomeFile.exe
            File tmp = new File(Selenide.$(By.tagName("body")).getText());
    

    or

            Selenide.$(By.id("button_for_file_download_after_click"))
                    .prepareDownload("C:\\SomeFolder", "", "application/pdf")
                    .click();
            File tmp = new File(Selenide.$(By.tagName("body")).getText());
    

    TODO:

    1. Review
    2. Some tests
    3. Merge conflicts
    feature downloading files 
    opened by ddemin 24
  • Provide more information when a file download fails

    Provide more information when a file download fails

    The problem

    In 1 of 10 cases one specific file download failes with:

    java.io.FileNotFoundException: Failed to download file {by text: test.txt} in 10000 ms.
    	at com.codeborne.selenide.impl.Downloads.lambda$firstDownloadedFile$0(Downloads.java:76)
    	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
    	at com.codeborne.selenide.impl.Downloads.firstDownloadedFile(Downloads.java:75)
    	at com.codeborne.selenide.impl.DownloadFileWithProxyServer.clickAndInterceptFileByProxyServer(DownloadFileWithProxyServer.java:84)
    	at com.codeborne.selenide.impl.DownloadFileWithProxyServer.lambda$download$0(DownloadFileWithProxyServer.java:46)
    	at com.codeborne.selenide.impl.WindowsCloser.runAndCloseArisedWindows(WindowsCloser.java:25)
    	at com.codeborne.selenide.impl.DownloadFileWithProxyServer.download(DownloadFileWithProxyServer.java:45)
    	at com.codeborne.selenide.commands.DownloadFile.execute(DownloadFile.java:63)
    	at com.codeborne.selenide.commands.DownloadFile.execute(DownloadFile.java:29)
    	at com.codeborne.selenide.commands.Commands.execute(Commands.java:157)
    	at com.codeborne.selenide.impl.SelenideElementProxy.dispatchAndRetry(SelenideElementProxy.java:130)
    	at com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:82)
    	at jdk.proxy2/jdk.proxy2.$Proxy29.download(Unknown Source)
    	at ch.ivyteam.ivy.project.workflow.webtest.WebTestDownloadCaseDocumentsIT.downloadDocument(WebTestDownloadCaseDocumentsIT.java:70)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    	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.interceptTestableMethod(TimeoutExtension.java:140)
    	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
    	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.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
    	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
    	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
    	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
    	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
    	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
    	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
    	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
    	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
    	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
    	at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:55)
    	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:223)
    	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:175)
    	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:139)
    	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456)
    	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169)
    	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595)
    	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581)
    

    Details

    The API doc outlines when a FileNotFoundException is thrown, that there was a 40X error. But I can not see any 40X request in my generated HAR report.

    I tried a lot of things, but I really don't get it. Can you help me to get more insights? Or can you provide more details, why the file download has failed?

    Tell us about your environment

    • Selenide Version: 6.9.0

    Code To Reproduce Issue

    openView("cases.xhtml");
    $(byText("Created case of TestData")).shouldBe(visible).click();
    $("#caseName").shouldBe(visible).shouldHave(text("Created case of TestData"));
    $(".documents-card").shouldHave(text("test.txt"));
    var downloadDocumentElement = $(byText("test.txt")).shouldBe(visible);
    Selenide.screenshot("download0");
    var scrolledDocumentElement = downloadDocumentElement.scrollIntoView("{behavior:\"smooth\",block:\"center\"}");
    $(".documents-card").scrollTo();
    Selenide.screenshot("download1");
    
    // This failes
    File download = scrolledDocumentElement.download();
    
    assertThat(download).hasName("test.txt");
    assertThat(Files.readString(download.toPath())).isEqualTo("this is test document");
    
    question downloading files 
    opened by alexsuter 1
  • Change the Chrome headless mode to the new one.

    Change the Chrome headless mode to the new one.

    The problem

    Selenium 4.8 is going to deprecate the headless API for Chromium options. This decision was made because the Chromium team has implemented a new Chrome headless mode that allows for overcoming the limitations of the old headless mode.

    Because we have a built-in Configuration.headless option, we have to decide whether to set the old headless option or change to the new mode.

    The first step seems to be to temporarily change the headless mode in our codebase and check the compatibility between the old and new modes. WIP in https://github.com/selenide/selenide/pull/2105

    Details

    For details see: https://github.com/SeleniumHQ/selenium/commit/2db6080beb30aa17fbe456959ddf21b1f7aaa0dc

    opened by BorisOsipov 0
  • Add method to enable/disable mobile emulation for an opened browser

    Add method to enable/disable mobile emulation for an opened browser

    The problem

    Currently Selenide allows to enable mobile emulation mode (at least in Chromium browsers), but only before the browser is opened - see https://selenide.org/2019/11/29/selenide-5.5.1/#we-added-mobile-browser-emulation

    But it would be more useful to enable/disable mobile mode when the browser is already opened. It should be doable with CDP.

    Tell us about your environment

    • Selenide Version: 6.10.3
    feature help wanted 
    opened by asolntsev 0
  • Added ElementsCollection & CollectionCondition attributes

    Added ElementsCollection & CollectionCondition attributes

    Proposed changes

    • Added attributes() method to ElementCollections to get List of each element attribute value
    • Added CollectionCondition.attributes condition (same as texts() & exactTexts()). Get attribute values List and Assert.

    ElementsCollection - get attribute values list

    elementsCollection.attributes("class");
    

    CollectionCondition - assert by attribute values

    elementsCollection.shouldHave(CollectionCondition.attributes("class", "visa", "mastercard", "amexpress"));
    elementsCollection.shouldHave(CollectionCondition.exactAttributes("class", "visa", "mastercard", "amexpress"));
    
    opened by AlexLAA 7
  • $.select* methods do not work in Internet Explorer

    $.select* methods do not work in Internet Explorer

    The problem

    In Selenide 6.10.1, method $.selectOptionContainingText() causes javascript errors in Windows 10 IE.

    Details

    If necessary, describe the problem you have been experiencing in more detail.

    Tell us about your environment

    • Selenide Version: 6.10.1
    • IE Version: 10
    • OS Version: Windows 11

    Code To Reproduce Issue [ Good To Have ]

    Configuration.baseUrl = "https://www.w3docs.com/";
    Selenide.open("/learn-html/html-select-tag.html");
    $("select")
            .scrollIntoView(false)
            .selectOptionContainingText("PHP");
    
    // ok: Selenide 6.9.0, Windows 11 Chrome 107
    // ok: Selenide 6.9.0, Windows 11 IE 10
    // ok: Selenide 6.10.1, Windows 11 Chrome 107
    // NG: Selenide 6.10.1, Windows 11 IE 10
    

    Error stack trace

    JavascriptException: Error executing JavaScript
    Screenshot: file:/Users/masashi.kondo/miidas/e2e/build/reports/tests/1669957828492.0.png
    Page source: file:/Users/masashi.kondo/miidas/e2e/build/reports/tests/1669957828492.0.html
    Timeout: 4 s.
    Caused by: JavascriptException: Error executing JavaScript
    JavascriptException: Error executing JavaScript
    Screenshot: file:/Users/masashi.kondo/miidas/e2e/build/reports/tests/1669957828492.0.png
    Page source: file:/Users/masashi.kondo/miidas/e2e/build/reports/tests/1669957828492.0.html
    Timeout: 4 s.
    Caused by: JavascriptException: Error executing JavaScript
    	at app//com.codeborne.selenide.ex.UIAssertionError.wrapToUIAssertionError(UIAssertionError.java:103)
    	at app//com.codeborne.selenide.ex.UIAssertionError.wrapThrowable(UIAssertionError.java:86)
    	at app//com.codeborne.selenide.ex.UIAssertionError.wrap(UIAssertionError.java:80)
    	at app//com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:92)
    	at app//jp.miidas.e2e.sample.SelenideTest.testSelectBS(SelenideTest.java:238)
    Caused by: org.openqa.selenium.JavascriptException: Error executing JavaScript
    Build info: version: '4.6.0', revision: '79f1c02ae20'
    System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '12.6', java.version: '18.0.2'
    Driver info: org.openqa.selenium.remote.RemoteWebDriver
    Command: [cd5fc84622969cbfa5b45ea60127d4b9a4872529, executeScript {script=return (function (select, texts) {
      if (select.disabled) {
        return {disabledSelect: 'Cannot select option in a disabled select'};
      }
    
      function optionByText(requestedText) {
        return Array.from(select.options).find(option => option.text.includes(requestedText))
      }
    
      const missingOptionsTexts = texts.filter(text => !optionByText(text));
      if (missingOptionsTexts.length > 0) {
        return {optionsNotFound: missingOptionsTexts};
      }
    
      const disabledOptionsTexts = texts.filter(text => optionByText(text).disabled);
      if (disabledOptionsTexts.length > 0) {
        return {disabledOptions: disabledOptionsTexts};
      }
    
      for (let requestedPartialText of texts) {
        optionByText(requestedPartialText).selected = 'selected';
      }
    
      const event = document.createEvent('HTMLEvents');
      event.initEvent('change', true, true);
      select.dispatchEvent(event);
    
      return {};
    })(arguments[0], arguments[1])
    
    , args=[{ELEMENT=4305e136-7150-43bd-bf76-563ec8d24eea, element-6066-11e4-a52e-4f735466cecf=4305e136-7150-43bd-bf76-563ec8d24eea}, [PHP]]}]
    	at app//com.codeborne.selenide.impl.JavaScript.execute(JavaScript.java:28)
    	at app//com.codeborne.selenide.commands.SelectOptionContainingText.execute(SelectOptionContainingText.java:30)
    	at app//com.codeborne.selenide.commands.SelectOptionContainingText.execute(SelectOptionContainingText.java:21)
    	... 1 more
    
    low priority bug 🐛 
    opened by asolntsev 5
Releases(v6.11.0)
  • v6.11.0(Jan 4, 2023)

    🚀 Features

    • #1817 add methods to copy and paste content (#2027) @evpl
    • added method to return last made screenshot (#2065) @armanayvazyan
    • #2054 fail the test if unexpected alert encountered (#2095) @asolntsev
    • #2087 support @As annotation for page object fields (#2088) @asolntsev
    • made setvalueoptions contructor as protected to reuse in selenide-appium (#2103) @amuthansakthivel

    Changes

    • Download large files (#2098) @asolntsev
    • 2037 download with basic auth (#2102) @asolntsev
    • Error message customizer (#2097) @asolntsev
    • #2085 fail $.download() if folder still contains "crdownload" files after timeout (#2089) @asolntsev
    • #2038 Fix flaky test in Selenide when downloading file on Windows (#2076) @BorisOsipov
    • #2081 create screenshot file with permissions -rw-r--r--, not -rw------- (#2084) @asolntsev
    • #2050: Improve syntax (#2080) @cocorossello
    • Split test reports per job (#2093) @BorisOsipov
    • simplify Mockito usage: mock(FooBar.class) -> mock() (#2073) @asolntsev
    • Gradle deprecations (#2079) @cocorossello
    • Gradle deprecations (#2078) @cocorossello

    📦 Dependency updates

    • Bump browserup-proxy-core from 2.2.6 to 2.2.7 (#2101) @dependabot
    • Bump mockito-inline from 4.10.0 to 4.11.0 (#2096) @dependabot
    • Automatically merge dependabot's PR if all checks passed (#2075) @BorisOsipov
    • Bump byteBuddyVersion from 1.12.19 to 1.12.20 (#2074) @dependabot
    • Bump mockito-inline from 4.9.0 to 4.10.0 (#2072) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.10.3(Dec 14, 2022)

    Changes

    • Selenide#2062: $.select* : don't fire change event if value is unchanged (#2063) @cocorossello

    📦 Dependency updates

    • Bump littleproxy from 2.0.14 to 2.0.15 (#2069) @dependabot
    • Bump seleniumVersion from 4.7.1 to 4.7.2 (#2068) @dependabot
    • Bump nettyVersion from 4.1.85.Final to 4.1.86.Final (#2066) @dependabot
    • Bump slf4jVersion from 2.0.5 to 2.0.6 (#2067) @dependabot

    📖 Documentation

    • Add syntax highlighting to the example code (#2059) @mahozad
    Source code(tar.gz)
    Source code(zip)
  • v6.10.2(Dec 8, 2022)

    Changes

    • Show $.select*() arguments in reports (#2052) @asolntsev
    • Selenide#2050: $.select* methods do not fire events (#2051) @cocorossello
    • #2045 show sessionStorage and localStorage in reports friendly (#2046) @asolntsev

    🚀 Features

    • added Press method to accept Key input (#2032) @amuthansakthivel

    📦 Dependency updates

    • Bump seleniumVersion from 4.7.0 to 4.7.1 (#2057) @dependabot
    • Bump jetty-servlet from 9.4.49.v20220914 to 9.4.50.v20221201 (#2056) @dependabot
    • Bump httpclient5 from 5.2 to 5.2.1 (#2058) @dependabot
    • bump Selenium from 4.6.0 to 4.7.0 (#2044) @asolntsev
    • Bump browserup-proxy-core from 2.2.5 to 2.2.6 (#2036) @dependabot

    📖 Documentation

    • Fix typos in .md files (#2033) @vlad-velichko
    Source code(tar.gz)
    Source code(zip)
  • v6.10.1(Nov 23, 2022)

    Changes

    • #2029 Configuration.browserSize setting is ignored and the size of the browser does not change in headfull chrome (#2030) @BorisOsipov

    📦 Dependency updates

    • Bump archunit-junit5 from 1.0.0 to 1.0.1 (#2028) @dependabot

    see https://github.com/selenide/selenide/milestone/170?closed=1

    Source code(tar.gz)
    Source code(zip)
  • v6.10.0(Nov 22, 2022)

    🚀 Features

    • #1989 support slow download (#2003) @asolntsev
    • #1990 fail download process faster than timeout (#2023) @asolntsev

    Changes

    • Fix an issue when a new tab size in headless chrome has incorrect size. (#2017) @BorisOsipov
    • #2015 un-deprecate BasicAuthCredentials constructor without domain (#2022) @asolntsev
    • Encode credentials in url (#2021) @asolntsev
    • Don't change pageLoadTimeout if it is negative. It allows to get rid of spam in error log on appium. (#2010) @BorisOsipov
    • #1553 select options using JavaScript (#1876) @asolntsev
    • #2007 make $.click(options) chainable (#2008) @asolntsev

    📦 Dependency updates

    • Bump slf4jVersion from 2.0.3 to 2.0.4 (#2025) @dependabot
    • Bump byteBuddyVersion from 1.12.18 to 1.12.19 (#2024) @dependabot
    • Bump mockito-core from 4.8.1 to 4.9.0 (#2016) @dependabot
    • Bump httpclient5 from 5.1.3 to 5.2 (#2014) @dependabot
    • Bump nettyVersion from 4.1.84.Final to 4.1.85.Final (#2012) @dependabot
    • Bump browserup-proxy-core from 2.2.4 to 2.2.5 (#2011) @dependabot
    • Bump commons-compress from 1.21 to 1.22 (#2005) @dependabot
    • Bump org.sonarqube from 3.4.0.2513 to 3.5.0.2730 (#2001) @dependabot
    • Bump seleniumVersion from 4.5.2 to 4.5.3 (#2000) @dependabot
    • Bump mockito-core from 4.8.0 to 4.8.1 (#1999) @dependabot
    • Bump browserup-proxy-core from 2.2.3 to 2.2.4 (#1992) @dependabot
    • Bump com.github.spotbugs from 5.0.12 to 5.0.13 (#1995) @dependabot
    • bump Jabel from 0.x to 1.0.0 (finally!) (#1987) @asolntsev
    • Bump byteBuddyVersion from 1.12.17 to 1.12.18 (#1984) @dependabot
    • Bump nettyVersion from 4.1.82.Final to 4.1.84.Final (#1983) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.9.0(Oct 7, 2022)

    🚀 Features

    • #1254 add methods to mock any server response in Selenide proxy (#1978) @asolntsev
    • add setting "connection timeout" in addition to "read timeout" (#1977) @asolntsev

    Changes

    • #1974 add Authorization header only for specified domain (#1975) @asolntsev
    • improve resolving proxy host name (#1970) @asolntsev
    • Disable logging for getAlias method (#1971) @reserved-word

    📦 Dependency updates

    • upgrade to selenium 4.5.0 & remove Opera support (#1967) @asolntsev

    https://github.com/selenide/selenide/milestone/166?closed=1

    Source code(tar.gz)
    Source code(zip)
  • v6.8.1(Sep 27, 2022)

  • v6.7.5(Sep 26, 2022)

    Changes

    🚀 Features

    • 1903 add annotation @As for page object fields (#1956) @asolntsev
    • Add method page() without Class argument (#1961) @asolntsev
    • #1946 deep shadow selectors support (#1947) @BorisOsipov

    📦 Dependency updates

    • #1850 don't include Mockito & AssertJ in all modules (#1964) @asolntsev
    • optimize dependencies (#1963) @asolntsev
    • Bump slf4jVersion from 2.0.1 to 2.0.2 (#1958) @dependabot
    • Bump junit-platform-suite-engine from 1.9.0 to 1.9.1 (#1960) @dependabot
    • Bump browserup-proxy-core from 2.2.2 to 2.2.3 (#1959) @dependabot
    • Bump byteBuddyVersion from 1.12.16 to 1.12.17 (#1957) @dependabot
    • bump JUnit from 5.9.0 to 5.9.1 (#1955) @asolntsev
    • Bump jetty-servlet from 9.4.48.v20220622 to 9.4.49.v20220914 (#1954) @dependabot
    • Bump slf4jVersion from 2.0.0 to 2.0.1 (#1953) @dependabot
    • Bump nettyVersion from 4.1.81.Final to 4.1.82.Final (#1951) @dependabot
    • Bump nettyVersion from 4.1.80.Final to 4.1.81.Final (#1950) @dependabot
    • Bump byteBuddyVersion from 1.12.14 to 1.12.16 (#1949) @dependabot
    • Bump mockito-core from 4.7.0 to 4.8.0 (#1948) @dependabot
    • Bump com.github.spotbugs from 5.0.11 to 5.0.12 (#1945) @dependabot
    • Bump com.github.spotbugs from 5.0.10 to 5.0.11 (#1944) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.7.4(Sep 5, 2022)

    Changes

    • #1942 don't remove shutdown hook at the moment when system shutdown is in progress (#1943) @asolntsev

    🚀 Features

    • Add remote read timeout as configurable parameter (#1936) @rodion-goritskov

    📦 Dependency updates

    • Bump nettyVersion from 4.1.79.Final to 4.1.80.Final (#1935) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.7.3(Aug 27, 2022)

    Changes

    🚀 Features

    • #1923 add condition partialValue (#1924) @asolntsev
    • #1928 add condition $.shouldHave(tagName("div")) (#1929) @asolntsev
    • Check that element is <select> in methods $.getSelectedText(), getSelectedValue() (#1934) @asolntsev
    • rename $.getSelectedText() to $.getSelectedOptionText() (#1934) @asolntsev
    • rename $.getSelectedValue() to $.getSelectedOptionValue() (#1934) @asolntsev

    📦 Dependency updates

    • Bump byteBuddyVersion from 1.12.13 to 1.12.14 (#1933) @dependabot
    • Bump com.github.spotbugs from 5.0.9 to 5.0.10 (#1930) @dependabot
    • Bump slf4jVersion from 1.7.36 to 2.0.0 (#1931) @dependabot
    • Bump webdrivermanager from 5.2.3 to 5.3.0 (#1932) @dependabot
    • Bump mockito-core from 4.6.1 to 4.7.0 (#1922) @dependabot
    • Bump browserup-proxy-core from 2.2.1 to 2.2.2 (#1921) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.7.2(Aug 14, 2022)

    Changes

    • #1917 fix memory leak (#1919) @asolntsev
    • select the right window when taking screenshot via DevTools (#1920) @asolntsev
    • Fix proxy usage (#1918) @asolntsev

    📦 Dependency updates

    • bump Selenium from 4.3.0 to 4.4.0 (#1913) @asolntsev
    Source code(tar.gz)
    Source code(zip)
  • v6.7.1(Aug 7, 2022)

    Changes

    • Fix markup in CHANGELOG for 6.7.0 version (#1910) @valfirst
    • #1894 restore Driver parameter in SelenidePageFactory.findSelector() - it's used by selenide-appium.
    Source code(tar.gz)
    Source code(zip)
  • v6.7.0(Aug 3, 2022)

    Changes

    • #1780 verify the whole text in $.shouldHave(text), not a substring (#1783) @asolntsev
    • #1886 decode downloaded file name if it's base64-encoded (#1889) @asolntsev
    • give user a clear hint if he occasionally passes an invalid file extension parameter (#1887) @asolntsev
    • restore IE support in setValue (#1907) @asolntsev
    • #1885 make type of setValue() parameter String again (#1888) @asolntsev

    🚀 Features

    • #1799 implement full-size screenshots as a separate Selenide plugin (#1858) @asolntsev
    • #1891 deprecate TestNG annotation @Report (#1909) @asolntsev
    • add cachelookup annotation support (#1894) @groov1kk
    • make HttpClientTimeouts public (#1902) @asolntsev

    📦 Dependency updates

    • Bump byteBuddyVersion from 1.12.12 to 1.12.13 (#1904) @dependabot
    • Bump webdrivermanager from 5.2.1 to 5.2.2 (#1901) @dependabot
    • upgrade to JUnit 5.9.0 (#1900) @asolntsev
    • upgrade-to-littleproxy-2.0.10 (#1896) @asolntsev
    • Bump browserup-proxy-core from 2.2.0 to 2.2.1 (#1895) @dependabot
    • Bump nettyVersion from 4.1.78.Final to 4.1.79.Final (#1892) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.6.6(Jun 30, 2022)

    Changes

    • #1880 open a browser when open() is called for the first time even if reopenBrowserOnFail is false. (#1881) @asolntsev
    • #1878 support mobile apps when checking webdriver health (#1879) @asolntsev
    • #1830 apply Sonarqube plugin to subprojects (#1863) @asolntsev
    • fix ClearWithShortcut when using EventFiringDriver (#1856) @petroOv-PDFfiller
    • Cleanup/remove deprecated capabilities (#1870) @asolntsev

    🚀 Features

    • Add shorter syntax to click (#1875) @asolntsev

    📦 Dependency updates

    • Bump com.github.spotbugs from 5.0.8 to 5.0.9 (#1874) @dependabot
    • Bump byteBuddyVersion from 1.12.11 to 1.12.12 (#1872) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.6.5(Jun 24, 2022)

    Changes

    📦 Dependency updates

    • Bump seleniumVersion from 4.2.2 to 4.3.0 (#1869) @dependabot
    • Bump byteBuddyVersion from 1.12.10 to 1.12.11 (#1868) @dependabot
    • Bump jetty-servlet from 9.4.47.v20220610 to 9.4.48.v20220622 (#1867) @dependabot
    • Bump jetty-servlet from 9.4.46.v20220331 to 9.4.47.v20220610 (#1865) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.6.4(Jun 20, 2022)

    🚀 Features

    • Add exact texts case sensitive (#1861) @ben-nc2
    • #1581 make method $.getSelectedOption() lazy-loaded (#1864) @asolntsev

    📦 Dependency updates

    • Bump browserup-proxy-core from 2.1.5 to 2.2.0 (#1860) @dependabot
    • Bump nettyVersion from 4.1.77.Final to 4.1.78.Final (#1857) @dependabot
    • Bump com.github.spotbugs from 5.0.7 to 5.0.8 (#1855) @dependabot

    https://github.com/selenide/selenide/milestone/158?closed=1

    Source code(tar.gz)
    Source code(zip)
  • v6.6.3(Jun 12, 2022)

  • v6.6.2(Jun 10, 2022)

  • v6.6.1(Jun 9, 2022)

  • v6.6.0(Jun 8, 2022)

    🚀 Features

    • #1497 extract clearing input with a shortcut to a separate plugin -- see PR #1847 and #1838
    • #1811 Add exact own text case-sensitive condition -- thanks to Kachurin Alexandr
    • #1812 Add own text case-sensitive condition -- thanks to Kachurin Alexandr
    • #1572 add $.click method with custom timeout -- see PR #1845
    • #1721 add methods confirm(), dismiss(), prompt() with custom timeout -- see PR #1846

    Changes

    • #1819 fix $.clear() in Safari -- see PR #1820
    • #1848 fix method Driver.executeJavaScript() to support wrapped webdriver
    • #1840 fix wording of some conditions to sound grammatically correct
    • #1807 fix case-related issues when running tests on TR locale -- thanks to Vladimir Sitnikov for the hint in PR #1696
    • #1836 add Safari options -- see PR #1841
    • #1834 fix SoftAsserts with TestNG (downgraded TestNG from 7.5 to 7.4.0) -- see PR #1843
    • #1814 upgrade to webdrivermanager 5.2.0
    • #1832 upgrade to selenium 4.2.1 -- see https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG
    Source code(tar.gz)
    Source code(zip)
  • v6.5.2(Jun 6, 2022)

  • v6.5.1(May 24, 2022)

    Changes

    • #1808 Don't move focus to next element when calling $.clear() (#1809) @asolntsev

    📦 Dependency updates

    • Bump browserup-proxy-core from 2.1.4 to 2.1.5 (#1806) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.5.0(May 18, 2022)

    Changes

    • 1779 make method $.download(FOLDER) wait for the full completion of download (#1804) @asolntsev
    • #1497 clear input (#1787) @asolntsev
    • Disable built-in Selenium OpenTelemetry tracing (#1763) @petroOv-PDFfiller

    🚀 Features

    • #1768 add method to mask passwords etc. in reports (#1770) @asolntsev
    • #1433 remove code that was not needed after introducing SelenideNettyClientFactory (#1798) @asolntsev
    • remove sleeps from Selenide own tests (#1785) @asolntsev
    • Fix flaky set value test (#1784) @asolntsev
    • #1773 add non-deprecated stream() method to selenide collections (#1774) @asolntsev

    📦 Dependency updates

    • Bump seleniumVersion from 4.1.3 to 4.1.4 (#1786) @dependabot
    • Bump nettyVersion from 4.1.75.Final to 4.1.77.Final (#1771) @dependabot
    • Bump littleproxy from 2.0.8 to 2.0.9 (#1801) @dependabot
    • Bump byteBuddyVersion from 1.12.9 to 1.12.10 (#1788) @dependabot

    https://github.com/selenide/selenide/milestone/151?closed=1

    Source code(tar.gz)
    Source code(zip)
  • v6.4.0(Apr 7, 2022)

    🚀 Features

    • #1765 show both alias and selector in error message (#1766) @asolntsev
    • #1764 add space to the left and right of every value (#1767) @asolntsev

    📦 Dependency updates

    • upgrade to Selenium 4.1.3 (#1759) @asolntsev
    Source code(tar.gz)
    Source code(zip)
  • v6.3.5(Mar 17, 2022)

    Changes

    • #1755 disable content encoding when downloading files via proxy -- see PR #1756

    📦 Dependency updates

    • Bump nettyVersion from 4.1.74.Final to 4.1.75.Final (#1754) @dependabot
    • Bump mockito-core from 4.3.1 to 4.4.0 (#1752) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.3.4(Mar 6, 2022)

    Changes

    • #1748 fix automatic module name in generated binaries @asolntsev
    • Feature/#1746 show expected attribute in error message (#1749) @asolntsev
    • Bump guava from 31.0.1-jre to 31.1-jre (#1742) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.3.3(Feb 20, 2022)

    Changes

    • moving merge of user defined capabilities to match other factories (#1737) @andrematosfundao

    📦 Dependency updates

    • Bump webdrivermanager from 5.0.3 to 5.1.0 (#1740) @dependabot
    • Bump com.github.spotbugs from 5.0.5 to 5.0.6 (#1739) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.3.2(Feb 16, 2022)

    Changes

    🚀 Features

    • Workaround for CDP issue with latest Firefox 97 (#1733) @asolntsev

    📦 Dependency updates

    • Bump browserup-proxy-core from 2.1.3 to 2.1.4 (#1736) @dependabot
    • Use java 17 for project, but compile for 8 version (#1611) @rosolko
    Source code(tar.gz)
    Source code(zip)
  • v6.3.1(Feb 9, 2022)

    Changes

    • #1731 re-enable using soft assertions in TestNG @Before* and @After* methods (#1732) @asolntsev

    📦 Dependency updates

    • Bump nettyVersion from 4.1.73.Final to 4.1.74.Final (#1729) @dependabot
    • Bump slf4jVersion from 1.7.35 to 1.7.36 (#1730) @dependabot
    • Bump jetty-servlet from 9.4.44.v20210927 to 9.4.45.v20220203 (#1727) @dependabot
    Source code(tar.gz)
    Source code(zip)
  • v6.3.0(Feb 7, 2022)

    6.3.0 (released 07.02.2022)

    • #1722 add support for custom duration in switchTo().frame() -- thanks @donesvad for PR #1722
    • #1650 add methods Selectors.byTagAndText and Selectors.withTagAndText -- thanks Maurizio Lattuada for PR #1651
    • #1723 bugfix: ignore newlines leading/trailing spaces in byTextCaseInsensitive -- see PR #1724
    • #1715 add "webdriver create" and "webdriver close" lines to Selenide report -- thanks Petro Ovcharenko for PR #1715
    • #1433 fix overriding default timeout for Selenium http client
    • #1705 avoid duplicate wrapping of ElementNotFound error -- see PR #1706
    • #1714 add support for BEARER token authentication
    • #1719 upgrade to Selenium 4.1.2 -- see https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG
    • #1656 Selenide doesn't throw an exception if selenide.remote is set, but empty -- thanks Boris Osipov for PR #1663
    Source code(tar.gz)
    Source code(zip)
Owner
Selenide
Selenide is a library for test automation powered by Selenium WebDriver
Selenide
Never debug a test again: Detailed failure reports and hassle free assertions for Java tests - Power Asserts for Java

Scott Test Reporter for Maven and Gradle Get extremely detailed failure messages for your tests without assertion libraries, additional configuration

Dávid Csákvári 133 Nov 17, 2022
A sample repo to help you handle basic auth for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to handle basic auth for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows - htt

null 12 Jul 13, 2022
A sample repo to help you clear browser cache with Selenium 4 Java on LambdaTest cloud. Run your Java Selenium tests on LambdaTest platform.

How to clear browser cache with Selenium 4 Java on LambdaTest cloud Prerequisites Install and set environment variable for java. Windows - https://www

null 12 Jul 13, 2022
A sample repo to help you run automation test in incognito mode in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to run automation test in incognito mode in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows - htt

null 12 Jul 13, 2022
A sample repo to help you handle cookies for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to handle cookies for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows - https:

null 13 Jul 13, 2022
A sample repo to help you set geolocation for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to set geolocation for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows - https

null 12 Jul 13, 2022
A sample repo to help you capture JavaScript exception for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to capture JavaScript exception for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Wi

null 12 Jul 13, 2022
A sample repo to help you find an element by text for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to find an element by text for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows

null 12 Jul 13, 2022
A sample repo to help you emulate network conditions in Java-selenium automation test on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to emulate network conditions in Java-selenium automation test on LambdaTest Prerequisites Install and set environment variable for java. Windows

null 12 Jul 13, 2022
Library that allows tests written in Java to follow the BDD style introduced by RSpec and Jasmine.

J8Spec J8Spec is a library that allows tests written in Java to follow the BDD style introduced by RSpec and Jasmine. More details here: j8spec.github

J8Spec 45 Feb 17, 2022
Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

Testcontainers Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium we

null 6.7k Jan 9, 2023
Most popular Mocking framework for unit tests written in Java

Most popular mocking framework for Java Current version is 3.x Still on Mockito 1.x? See what's new in Mockito 2! Mockito 3 does not introduce any bre

mockito 13.6k Jan 9, 2023
Roman Beskrovnyi 248 Dec 21, 2022
Arbitrary test data generator for parameterized tests in Java inspired by AutoFixture.

AutoParams AutoParams is an arbitrary test data generator for parameterized tests in Java inspired by AutoFixture. Sometimes setting all the test data

null 260 Jan 2, 2023
🤖 Unleash the full power of test.ai into your Java Selenium tests

The test.ai selenium SDK is a simple library that makes it easy to write robust cross-browser web tests backed by computer vision and artificial intelligence.

test.ai 5 Jul 15, 2022
🤖 Unleash the full power of test.ai into your Java Appium tests

The test.ai Appium SDK is a simple library that makes it easy to write robust cross-platform mobile application tests backed by computer vision and ar

test.ai 9 Jun 4, 2022
A sample repo to help you capture JavaScript exception for automation test in Java-TestNG on LambdaTest. Run Selenium tests with TestNG on LambdaTest platform.

How to capture JavaScript exception for automation test in Java-TestNG on LambdaTest Environment Setup Global Dependencies Install Maven Or Install Ma

null 11 Jul 13, 2022
A sample repo to help you use relative locators for automation test in Java-TestNG on LambdaTest. Run Selenium tests with TestNG on LambdaTest platform.

How to use relative locators for automation test in Java-TestNG on LambdaTest Environment Setup Global Dependencies Install Maven Or Install Maven wit

null 11 Jul 13, 2022
A sample repo to help you use CDP console in Java-TestNG automation test on LambdaTest. Run Selenium tests with TestNG on LambdaTest platform.

How to use CDP console in Java-TestNG automation test on LambdaTest Environment Setup Global Dependencies Install Maven Or Install Maven with Homebrew

null 11 Jul 13, 2022