How to send shortcut keys using selenium in python to move through webpage
问题 I want to move through the all the posts and hitting like on the Facebook, and what I found out is we can move through every post pressing 'j' key on the keyboard and 'l' key to like the post. Now I want to automate this using selenium in Python. how can I accomplish this ? the code I tried is..(only lines which interact with the page) page=driver.find_element_by_tag_name('body') for i in range(10):#i am testing this so i tried to do this for 10 posts time.sleep(2) page.send_keys('j') time