Hi I have this short code snippet:
search_box = self.browser.find_elements_by_id('main-search-box')
search_box[0].click()
search_box[0].send_keys('{0} {1}'.format(first_name, last_name))
search_button = self.browser.find_elements_by_class_name('search-button')
search_button[0].click()
It used to work but today it suddenly stopped working, it is as the button is not clicked. I changed it to:
search_box = self.browser.find_elements_by_id('main-search-box')
search_box[0].click()
search_box[0].send_keys('{0} {1}'.format(first_name, last_name))
search_box[0].send_keys('\n')
And now it works fine. What could be the reason for the original code to not work anymore?
P.S I'm searching on LinkedIn using selenium and PhantomJS.