To Use Dependencies with Selenium Webdriver's Test Methods in TestNG
In above code, method SignIn() is dependent on OpenBrowser() and method LogOut() is dependent on SingIn and OpenBrowser methods.
Below is the execution sequence of above code snippet:
This will execute first (Open Browser)
This will execute second (SignIn)
This will execute third (Log Out)
Feel free to share your thoughts and views. Enjoy :)