Mo0rBy
Mo0rBy

Reputation: 690

How to interact with a hidden element using Serenity-BDD

What I want to achieve in my Performable is very simple, but I can't do it due to a hidden element.

I want my actor to:

My current code is:

public class Set {
    public static Performable dateFrom(String date) {
        return Task.where("{0} set 'dateFrom' filter to " + date,
            Click.on(SearchPage.dateTimePicker_from),
            Enter.theValue(date).into(SearchPage.dateTimePicker_from)
            .thenHit(RETURN)
        );
    }
}

The exact error I receive when running the test is [main] ERROR - Expected enabled element was not enabled.

I found that this is due to the <input> element being hidden (but there is a <div> element "in-front" of this <input>)

How can I click a hidden element within my Task, without requesting a change from my Dev team?

Upvotes: 0

Views: 507

Answers (1)

D Petkova
D Petkova

Reputation: 111

Have you tried with JavaScriptClick?

Upvotes: 1

Related Questions