How to create cookie using selenium? -


i want create cookie using selenium. have seen method supports selenium.createcookie(arg1,arg0), i'm bit confused arguments passed. can please give me example?

createcookie ( namevaluepair,optionsstring ) create new cookie path , domain same of current page under test, unless specified path cookie explicitly.

arguments:

  1. namevaluepair - name , value of cookie in format "name=value"

  2. optionsstring - options cookie. supported options include 'path' , 'max_age'. optionsstring's format "path=/path/, max_age=60". order of options irrelevant, unit of value of 'max_age' second.

source: selenium reference


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -