SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

Any site can have single or multiple cookies. If you know cookie name then you can get it's detail easily using getCookieNamed(). But if there are multiple cookies and you need all of them then you need to use getCookies(). It will retrieve all cookies of site you are navigating in selenium webdriver test. Here we will learn how to get all cookies using getCookies() and extracting all cookie detail using Java Set interface and Iterate through cookie set using Iterator.

Most of all you are already aware about browser cookie. Basically cookie is piece of data that is stored in your browser. It is sent from website you visit and mostly it is used to recognize if user return to website again. In sort, It tracks your website navigation journey. Cookie consist of different parameters like name, value, expiry, path, etc. Here we will see how can we add cookie and get cookie from browser in selenium webdriver using addCookie() and getCookieNamed().

Sometimes you need to set Dimension and Position of your browser window. Webdriver have built in Dimension and Position class with many different methods. We can use both these class and it's methods to set dimensions and positions of browser window. Let's see how we can use Dimension and Position methods to manage size and position