Hello fellow StackOverflow users. What I am trying to achieve is prevent annoying helper boxes from popping up when my tests open the main page. So far this is the method I am using to open the main page:
def open_url(self, url):
"""Open a URL using the driver's base URL"""
self.webdriver.add_cookie({'name' : 'tour.index', 'value' : 'complete', 'domain' : self.store['base'] + url})
self.webdriver.add_cookie({'name' : 'tour.map', 'value' : 'complete', 'domain' : self.store['base'] + url})
self.webdriver.get(self.store['base'] + url)
However, what returns after I run the test is this:
2014-07-23 15:38:19.453057: X Message: u'You may only set cookies for the current domain' ;
How can I set the cookie before I actually load the base testing domain?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…