<span class="Select-some-wrapper" id=“id—value">
<div class="Select-placeholder">Name</div>
<div role=“xx” aria-expanded="false" aria-owns="" aria-
activedescendant=“id—value" class="Select-input" aria-readonly="false"
"></div></span>
Basically the dropdown placeholder is Name and I have to choose the second option from the dropdown. This is a react select for a dropdown and I was trying to use capybara selenium to test it as shown below:
find(:xpath,"//*[text()='Name']").click
Name_element=find(:xpath,"//*[text()='Name']")
Name_element.send_keys(:arrow_down).send_keys(:enter)
After I click on the element I am clicking arrow_down to go to the second option and hit enter. This works fine when I run it locally. When I use headless mode the browser locates the element but doesnt show the dropdown instead it keeps clicking on the placeholder twice. And it doesn't give any error.
When I click the placeholder the values change as shown below:
<span class="Select-some-wrapper" id=“id—value">
<div class="Select-placeholder">Name</div>
<div role=“xx” aria-expanded="true" aria-owns="id--list" aria-
activedescendant=“id—value-option-0" class="Select-input" aria-
readonly="false" "></div></span>