ERROR - ChromeDriver element not interactable IN Selenium JUnit Testing

47 views
Skip to first unread message

Bret Linne

unread,
Jun 2, 2023, 1:56:55 PM6/2/23
to ChromeDriver Users
I'm using Spring Boot to write an application.  The JUnit test is calling the Chrome Driver to open a test window to run through the application.

This application uses AWS Cognito as the login page.  

It appears to be failing on that login page.
The chrome driver window appears, the AWS login page briefly can be seen and then it closes itself.

GIF of that event:
vlc_pvaCyVUV2P.gif

the error shown in the output:
SpringToolSuite4_8ZTCq5KgXc.png

I'm not at all sure what could be causing this.  This same JUnit test works fine on a coworker's computer, but he's not sure what the difference is.

As far as I can tell it doesn't get past the login page
rd2Ddz7KkK.png

Bret Linne

unread,
Jun 2, 2023, 5:07:21 PM6/2/23
to ChromeDriver Users
Progress on the issue

I put in an implicit wait to the test, which give me some time to interact with the window.
After doing that, I found that if I open the developer tools panel, the selenium test proceeds as normal.  The AWS form is populated with the expected
username and password, the login proceeds, the desired web page is pulled up and things go along correctly.

It narrows things down but doesn't answer what's happening.

Another workaround I found is that if I pass the "headless" option to the driver, the test proceeds as normal, though the chrome window is prevented from displaying.
I don't know if this will be sufficient as a workaround and still doesn't answer what's happening.  

A friend suggested that newer versions of Chrome are disallowing interaction from untrusted sources.  The selenium driver may be considered an untrusted source.
Once the developer panel is opened, chrome might be registering the interaction as from a trusted source (Windows OS and /or the current User) and then that's why
the test proceeds normally.
Reply all
Reply to author
Forward
0 new messages