How can I simulate the enter key in Selenium webdriver?
I want to choose a menu in the drop down for countries and list is chosen only upon hitting enter or clicking one of the list options.
Here is my code uptill the point of the enter key. the code breaks at the 7th line.
it('Should let valid users login' .function () {
browser.url('/customer/signup'); browser.element('#customer_user_attributes_first_name').setValue('Name');
browser.element('#customer_user_attributes_last_name').setValue('lastname');
browser.element('#customer_user_attributes_email').setValue('test@email.com');
browser.element('#customer_company').setValue('company');
browser.element('#customer_phone_number').setValue('2222222222');
browser.click('.select2-selection__arrow')[0]
browser.element('.select2-search__field').setValue('United States');