Store and attach cookies Webdriver Java Firefox Profiles
I want to automate the 'Keep me signed in' functionality. Steps are as
below, [java][webdriver]
1) Open http://hotmail.com/ 2) Type in the correct 'username' and
'Password' 3) Click on "Keep my Signed in" 4) Close the browser 5) Open
the browser again navigate to "http://hotmail.com/" 6) browser should be
able to directly sign in
As we know that WebDriver creates new session for every launch, so it will
not be signed in for the second launch. So I created the firefox profile,
added some of the cookies, closed the browser and launched and loaded the
app again with the same profile. But it is not logged in.
I am not clear about storing cookies to the profile and using those for
the second launch of firefox browser. Also it generates lots of cookies.
Do I need to store all the cookies to the firefox profile?.
Please throw your suggestions.
Thanks, Elang.
No comments:
Post a Comment