blob: f9d380c968b7b365b9799964859cdb20b9a3920a [file] [log] [blame]
sv764t8bf49982018-10-25 01:42:52 -04001import urllib
2from selenium import webdriver
3import base64
4
5class HTTPUtils:
6 """HTTPUtils is common resource for simple http helper keywords."""
7
8 def url_encode_string(self, barestring):
9 """URL Encode String takes in a string and converts into 'percent-encoded' string"""
10 return urllib.quote_plus(barestring)
11
12 def ff_profile(self):
13 fp =webdriver.FirefoxProfile()
14 fp.set_preference("dom.max_script_run_time",120)
15 fp.update_preferences()
16 return fp.path
17
18 def b64_encode(self, instring):
19 ""
20 return base64.b64encode(instring)
21