Soometimes you need to check the URL of current selected window to perform some actions. In such cases, selenium has two commands to verify the absolute URL of the current selected page. "verifyLocation" and "assertLocation".
"verifyLocation" command will just verify your trageted URL with absolute URL of the current page and returns error message if match not found and will go for executing next command. In bellow given example, first "verifyLocation" will becomes pass but 2nd "verifyLocation" will be fail because trageted URL will notmatch with the absolute URL of the current page. But it will not stop execution and will go for executing next command.
"assertLocation" Command will check and compare targeted URL with absolute URL of the current selected page and will return error message if both URLs not match. If "assertLocation" Command fails then selenium will stop execution of sript. In above example, 1st "assertLocation" Command will return error message so that next command will be not executed.