Coordinate-Based Clicks and Non-Standard Controls

You’re automating a test, and you need to work with a custom control. The tool you’re using doesn’t want to cooperate. Should you implement click actions using X and Y coordinates?

It’s wise to avoid implementing hard-coded clicks. Instead, use selectors to obtain a parent element and work your way down the DOM tree.

Why? Using coordinates will make your tests more brittle; especially when it comes to responsive applications.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s