python click library code example
Example 1: import click click.echo() .format python 3
import click
@click.command()
@click.option('--verbose', is_flag=True, help="Will print verbose messages.")
@click.option('--name', '-n', multiple=True, default='', help='Who are you?')
@click.argument('country')
def cli(verbose,name, country):
"""This is an example script to learn Click."""
if verbose:
click.echo("We are in the verbose mode.")
click.echo("Hello {0}".format(country))
for n in name:
click.echo('Bye {0}'.format(n))
Example 2: button click event in python
button_element = driver1.find_element_by_id('button event')
button_element.click()