You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use plugin to generate tests for Dropdown
or use the following code:
importcom.codeborne.selenide.ElementsCollection;
importcom.codeborne.selenide.SelenideElement;
importorg.openqa.selenium.By;
importstaticcom.codeborne.selenide.Condition.text;
importstaticcom.codeborne.selenide.Selenide.$;
publicclassDropdown {
publicfinalStringname;
publicfinalSelenideElementfield;
publicfinalElementsCollectionitems;
publicDropdown(Stringname, ByfieldLocator, ByitemLocator) {
field = $(fieldLocator);
items = field.$$(itemLocator);
this.name = name;
}
publicvoidselect(Stringtext) {
field.hover(); //so that list is expandeditems.filterBy(text(text)).first().click();
}
}
Expected behavior
No exception is expected to be thrown in IDEA.
Actual behavior
Exception in IDEA:
com.jetbrains.rd.util.reactive.RdFault: Collection contains no element matching the predicate., reason: java.util.NoSuchElementException: Collection contains no element matching the predicate.
alisevych
changed the title
RfFault with NoSuchElementException for Selenide based project
RfFault with NoSuchElementException for Selenide based class
Nov 14, 2022
Same exception is thrown when generating tests for the following method in UTBotJava utbot-framework module: org.utbot.instrumentation.warmup.Warmup::doWarmup2
The reason is that the class you were generating tests for resides in org.utbot package. All classes in org.utbot are considered as internal classes and filtered out from instrumentation.
Proposed fix: throw exception when generating tests for such classes.
alisevych
changed the title
RfFault with NoSuchElementException for Selenide based class
RfFault with NoSuchElementException for classes in org.utbot package
Dec 6, 2022
As discussed with the team the issue is of low priority and thus should be closed.
The restriction described in the previous comment is needed to guarantee UTBot correct work. There should be a very important reason to get rid of it - because it requires complex refactoring and related issues fixes.
Description
Soot throws NoSuchElementException: Collection contains no element matching the predicate
Displayed as IDEA exception with RdFault
To Reproduce
or use the following code:
Expected behavior
No exception is expected to be thrown in IDEA.
Actual behavior
Exception in IDEA:
com.jetbrains.rd.util.reactive.RdFault: Collection contains no element matching the predicate., reason: java.util.NoSuchElementException: Collection contains no element matching the predicate.
Visual proofs (screenshots, logs, images)
Environment
IntelliJ IDEA 2022.2.3 Build #IU-222.4345.14
JDK: 17.0.4.1; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
OS: Windows 10
Plugin to blame: UnitTestBot version: 2022.11.525.
Additional context
Selenide elements and Selenium's By classes are used in constructor and method calls.
The text was updated successfully, but these errors were encountered: