What are the differences between XSpace & Xmargin?

What are the differences between XSpace & Xmargin?

XMargin

The XMargin is used to click on coordinates horizontally, for example, 100 pixels to the right or left of specific classifiers such as text or buttons.

Example:
OpenBrowser Chrome “Web inputs
Click Text “Clear Inputs” -XMargin -150
Click Text “Display Inputs” -XMargin 150


XSpace

Let’s say you want to retrieve the text to the right of a specific text using XSpace. However, there’s a significant gap between the text you want to retrieve and the target text. By utilizing the option -XSpace 250, you can effectively retrieve the text.

Example:

GetText “Email Address {EmailAddressParam1}” -XSpace 250
GetText “Username {UsernameParam1}” -XSpace 250
GetText “Password {PasswordParam1}” -XSpace 250
GetText “Website {WebsiteParam1}” -XSpace 250
RunCommand “Notepad.exe”
Write {EmailAddressParam1}
SendKeys ENTER
Write {UsernameParam1}
SendKeys ENTER
Write {PasswordParam1}
SendKeys ENTER
Write {WebsiteParam1}