karibu-testing
karibu-testing copied to clipboard
A page with CheckboxGroup causes exception during pretty print
Hello Martin,
I accidentally searched for a button on a page where this button is not visible. This page also contains a checkbox group.
I got the following exception, which is probably not what you intended:
java.lang.IllegalAccessError: class com.github.mvysny.kaributesting.v10.GridKt tried to access private method 'com.vaadin.flow.data.provider.DataProvider com.vaadin.flow.component.checkbox.CheckboxGroup.getDataProvider()' (com.github.mvysny.kaributesting.v10.GridKt and com.vaadin.flow.component.checkbox.CheckboxGroup are in unnamed module of loader 'app')
at com.github.mvysny.kaributesting.v10.GridKt.getDataProvider(Grid.kt:937)
at com.github.mvysny.kaributesting.v10.PrettyPrintTreeKt.toPrettyString(PrettyPrintTree.kt:137)
at com.github.mvysny.kaributesting.v10.PrettyPrintTree$Companion.ofVaadin(PrettyPrintTree.kt:55)
at com.github.mvysny.kaributesting.v10.PrettyPrintTree$Companion.ofVaadin(PrettyPrintTree.kt:57)
at com.github.mvysny.kaributesting.v10.PrettyPrintTree$Companion.ofVaadin(PrettyPrintTree.kt:57)
at com.github.mvysny.kaributesting.v10.PrettyPrintTree$Companion.ofVaadin(PrettyPrintTree.kt:57)
at com.github.mvysny.kaributesting.v10.PrettyPrintTree$Companion.ofVaadin(PrettyPrintTree.kt:57)
at com.github.mvysny.kaributesting.v10.PrettyPrintTree$Companion.ofVaadin(PrettyPrintTree.kt:57)
at com.github.mvysny.kaributesting.v10.PrettyPrintTreeKt.toPrettyTree(PrettyPrintTree.kt:64)
at com.github.mvysny.kaributesting.v10.LocatorKt._find(Locator.kt:195)
at com.github.mvysny.kaributesting.v10.LocatorKt._get(Locator.kt:155)
at com.github.mvysny.kaributesting.v10.LocatorJ._get(LocatorJ.java:65)
at de.hahn.pageobjects.SafeguardEditorPage.getSaveButton(SafeguardEditorPage.java:187)
at de.hahn.pageobjects.SafeguardEditorPage.saveIsEnabled(SafeguardEditorPage.java:229)
at de.hahn.safeguard.SafeguardPoolEditorTest.creating_a_safeguard_enables_all_buttons(SafeguardPoolEditorTest.java:64)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
This line causes the problem:
Which Karibu Testing and which Vaadin version please?
<vaadin.version>24.1.4</vaadin.version> <karibu.version>2.1.4</karibu.version>
Please upgrade to newest Vaadin 24.4, the CheckboxGroup.getDataProvider()
function is public there.
Hello Martin,
I dont think this works:
The checkbox does not get selected.
<vaadin.version>24.4.7</vaadin.version>
<karibu.version>2.1.5</karibu.version>
Also in the documentation the java version of this call is not mentioned:
Call checkboxGroup.selectByLabel("Item #1", "Item #3") to select items with given labels (since KT 1.3.15).
Please create a new issue.