Closed Nitrodist closed 3 years ago
You shouldn’t be using select_option if the select element is non-visible. Instead you should be interacting directly with the bootstrap-select widgets elements (not via execute_script)
@Nitrodist This really is more of a Capybara question than an apparition question, but if you provide the HTML the user is actually interacting with I'll try and lead you in the direction you should be using. Likewise if you can provide a simple example where option_select
hangs things I will take a look.
Hello, I tried invoking .option_select on an
<option>
node - while it worked, there was a side effect of the chrome window never closing and the test never moving on to the next test despite all of the code in the test being finished.Removing the call to .option_select fixed the issue, however, I was not able to programmatically select it using the capybara driver. I was able to select my option via
bootstrap-select
methods (see block below), mostly because my use case is a bootstrap-select enabled select field that maps customer names to their id in the database. I need to make a call to that library anyway, pretty much... however I did in earnest try to use.select_option
.Complicating this matter is that the option was/is invisible due to using bootstrap-select.
This happens if I use headless and if I don't use headless.
My code: