0
votes

I would like to implement the following commands which already work in the Selenium IDE (screenshot) to pyhton (see coding).

https://i.ibb.co/ydMWN1R/selenium.png

driver.get("https://www.luckyemoji.com/logout");
driver.get("https://www.luckyemoji.com/login");
element = driver.find_element_by_name('email')
element.send_keys('#####')
element = driver.find_element_by_name('password')
element.send_keys('#####')
driver.switch_to.frame(0)
driver.find_element_by_xpath("//span/div[3]").click()

Following error occours:

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//span/div[3]"} (Session info: chrome=72.0.3626.121) (Driver info: chromedriver=2.35 (0),platform=Linux 4.14.98-v7+ armv7l)

1

1 Answers

0
votes

That means, that you are trying to click an element that isnt existing, if you go to the website, do you know wich button you are trying to click? If you can show me this button, I could help you.

PS: may add another screenshot

PPS: there is a captcha, so you arent enable to enter this competition with a bot (if you are trying to make like 1000 accounts to win money ;D )

Edit: To get the working xpath, go on the website, press F12, click on the icon in the top left corner (at the window that popped up), than click on the button(the button that the program should click), then right click the thing that is marked at the right side of your screen, then click copy -> xpath

Hope you can understand that xP