How to click a given point of an element in Selenium | automateNow

preview_player
Показать описание
Learn how to click a given point of an element in Selenium WebDriver.

Did you know that by default, Selenium clicks the center point of a given element? But, what if you have a scenario where you need to click a specific area of an element? Selenium provides a special method for that called moveToElement() and in this video you will learn how to use it to move a slider element around.

👨‍💻Learn Selenium like a pro with our highly-rated courses!

📑 CHAPTERS
00:00 ~ Intro
01:04 ~ How clicking works in Selenium
02:40 ~ How to click a given point in the element
05:35 ~ Click middle of element
07:02 ~ Click right side of element
11:13 ~ Click left side of element
Рекомендации по теме
Комментарии
Автор

It was excellent, thank you very much!

senanur
Автор

Is it possible to click outside of the button with this code? Because I have a website that is charging with javascript whenever one does an action. And for some reason, selenium is not finding a button that appears even though I put a pause of many seconds.

Given this scenario, I thought of finding a button I'm sure selenium can find and then telling him to move to the button in question with pixels... For example, go down 180 pixels and click there. This would open the file I need to open.

jpanduezadlf
Автор

Happy to learn, keep it up and thanks for the information.. are planning for any appium videos as well.. would love to see those from you.
Also, will you make video for some drag and drop actions as well? Thanks again 😊

joshibhushan
Автор

Thanks for sharing your knowledge, recently I've been learning about Selenium and your video was halpful, btw I'm using it on Python so when I check the oficial documentation about Selenium I found that 'moveToElement()'(Java) method has been removed from Python in Selenium v4.3. Have you any idea how to replicate the behavior you taught on this video but using Python?

DanKayser
Автор

Is there any way to right click on a element using webpath ?

parzivelgamer
Автор

I am building a project with python via selenium. There is an xpath in the section form, but no matter what I do to that button, I cannot push it. can you help me. I will pay whatever.

HackYedinTR