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:
namevaluepair - name , value of cookie in format "name=value"
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
Post a Comment