Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to access my Behave configuration values. #1163

Open
Abdul-rehman-3620 opened this issue Feb 29, 2024 · 1 comment
Open

Not able to access my Behave configuration values. #1163

Abdul-rehman-3620 opened this issue Feb 29, 2024 · 1 comment

Comments

@Abdul-rehman-3620
Copy link

Hello everyone I am using a function to access value from the behave.ini but I am not able to access the value from behave.

def get_value_from_ini(context, key):
    """This function returns the configuration value from behave.ini.

    Args:
        context (Context): The default object is available throughout the behave framework.
        key (Any): Key in the key-value pair from the behave.ini.

    Returns:
        Value (Enum): Value in the key-value pair from the behave.ini
    """

    return context.config.userdata.get(key)
@jenisys
Copy link
Member

jenisys commented Feb 29, 2024

Your description lacks the information how you provide the data in the behave.userdata section in the config-file (and that your config-file is used at all).

SEE ALSO:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants