def generate_config(platforms, browsers_settings):
    """
    Generation config for parametrize tests by platforms, browsers and screen resolutions.

    :param platforms: Dict with platforms settings.
    :param browsers_settings: Browsers for each platform.
    :returns: Generator for list of dictionaries.
    """
    configs = []
    for base, params in browsers_settings.items():
        browsers, resolutions = params
        for browser in browsers:
            new_config = platforms[base].copy()
            new_config.update(browser)
            if resolutions:
                for resolution in resolutions:
                    new_config = new_config.copy()
                    new_config['resolution'] = '%sx%s' % resolution
                    configs.append(new_config)
            else:
                configs.append(new_config)
    return configs
