How to close react-select input when user clicks outside of the input? - react-select

I'm creating a select input using react-select version 1.1.0.
After I click the right-arrow to open the dropdown list, it doesn't close when I click elsewhere on the page. I have to either select an element or click the arrow again to close the element.
How can I make the dropdown list close when the user clicks outside the select element?
https://codesandbox.io/s/nrmpvw6oll

Related

robotframework- unable to click a button on a modal dialogue box

when I open a particular webpage it has a EULA form that appears on top of the home page in the form of a modal in HTML/CSS. I have tried the XPath of the accept button but it says element not found also tried using handle alert.
is there a unique way to handle a dialogue box in robotframework?
image of HTML in inspect view
SeleniumLibrary.Set Focus To Element ${button_on_popup_page}
SeleniumLibrary.Click Element ${button_on_popup_page}
I figured it out, shown in the above code. I first set focus to the button and then used the click element. This seemed to work.

How to keep the dropdown list open in robot framework

Here, I will click the actions tab and select create new project from the drop down list.
While executing the script in robot framework, after clicking the actions tab the drop down list will be opened and after few seconds it automatically got closed.
I need to know how to keep the list to be in open.
Most likely, what is happening is that the library you use to create the dropdown is designed to dismiss the dropdown when the mouse leaves the dropdown. If that is the case, the solution is to first move the mouse over the dropdown before clicking on it.
The SeleniumLibrary has a Mouse over keyword that will simulate the mouse being over the element.

selenium, hidden button by overlapped input ( not clickable)

Is there any way on how to click a hidden button by an overlapped input text field, for example if you go to www.google.com and enter a text to search for, selenium can not find the "Search Google" button because it is hidden by the autocomplete of the text field.
Thanks.
You can bypass the validation by using #click! instead of #click. Basically, this triggers the click via JavaScript rather than through standard Selenium commands.
browser = Watir::Browser.new
browser.goto('www.google.com')
browser.text_field(name: 'q').set('watir')
browser.button(name: 'btnK').click!
If you are only using Selenium, you can do:
btn = driver.find_element(name: 'btnK')
driver.execute_script('arguments[0].click();', btn)
As discussed in the comments, you could also close the suggestions box before trying to click the button. You can do this by moving focus to any other element - eg the first link on the page. Depending on what you're testing, this may or may not have value.
browser.text_field(name: 'q').set('watir')
browser.link.focus # move focus to any other element so suggestions close
browser.button(name: 'btnK').click

I have to maxmimize the child page minimized when it double clicked on its parent page. Is this possible to work in webform in vb.net

I had a page with gridview when clicking on the hyperlink in the cell it will open a popup window.
When this popup is minimized I was not able to click anything on the parent page so I need when I double click of mouse on parent page I want this popup to be maximized. And I was not even able to open new tab also when popup is minimized .so new tab also have to be opened when popup is minimized I dont want to use any extra buttons in my design.

How to allow clicking on row elements in dynatree

I want to render dynatree node with several checkboxes and select any, but when I click on checkbox, happens click on row, how can I disable click on row and enable clicking on elements, located in node?
It is simple. Use from server noLink: true(node title will be span, not a) and don't remove e.preventDefault, because
Make sure that clicks stop, otherwise <a href='#'> jumps to the top