File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
e2e-tests/src/main/java/io/kafbat/ui/screens/topics Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 11package io .kafbat .ui .screens .topics ;
22
3+ import static com .codeborne .selenide .Selenide .$ ;
34import static com .codeborne .selenide .Selenide .$x ;
45
56import com .codeborne .selenide .CollectionCondition ;
910import io .qameta .allure .Step ;
1011import java .util .ArrayList ;
1112import java .util .List ;
13+ import java .util .NoSuchElementException ;
1214
1315public class TopicSettingsTab extends BasePage {
1416
1517 protected SelenideElement defaultValueColumnHeaderLocator = $x ("//div[text() = 'Default Value']" );
18+ protected SelenideElement nextButton = $x ("//button[contains(text(), 'Next')]" );
19+ protected SelenideElement previousButton = $x ("//button[contains(text(), 'Previous')]" );
1620
1721 @ Step
1822 public TopicSettingsTab waitUntilScreenReady () {
@@ -36,7 +40,23 @@ private TopicSettingsTab.SettingsGridItem getItemByKey(String key) {
3640
3741 @ Step
3842 public String getValueByKey (String key ) {
39- return getItemByKey (key ).getValue ();
43+ while (true ) {
44+ try {
45+ String value = getItemByKey (key ).getValue ();
46+ resetPageNavigation ();
47+ return value ;
48+ } catch (NoSuchElementException ignored ) {
49+ if (nextButton .isEnabled ()) {
50+ nextButton .click ();
51+ }
52+ }
53+ }
54+ }
55+
56+ private void resetPageNavigation () {
57+ while (previousButton .isEnabled ()) {
58+ previousButton .click ();
59+ }
4060 }
4161
4262 public static class SettingsGridItem extends BasePage {
You can’t perform that action at this time.
0 commit comments