import os
from configparser import ConfigParser
from helper.helper_web import get_browser


def before_all(context):
    config = ConfigParser()
    print((os.path.join(os.getcwd(), 'setup.cfg')))
    my_file = (os.path.join(os.getcwd(), 'setup.cfg'))
    config.read(my_file)
 
    # Reading the browser type from the configuration file
    helper_func = get_browser(config.get('Environment', 'Browser'))
    context.helperfunc = helper_func
    
 
def after_all(context):
    context.helperfunc.close()
[((7, 13, 7, 27), 'configparser.ConfigParser', 'ConfigParser', ({}, {}), '()', False, 'from configparser import ConfigParser\n'), ((9, 28, 9, 39), 'os.getcwd', 'os.getcwd', ({}, {}), '()', False, 'import os\n'), ((8, 24, 8, 35), 'os.getcwd', 'os.getcwd', ({}, {}), '()', False, 'import os\n')]