import time

from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
from src.testproject.classes import DriverStepSettings, StepSettings
from src.testproject.decorator import report_assertion_errors
from src.testproject.enums import SleepTimingType
from src.testproject.sdk.drivers import webdriver
import pytest


"""
This pytest test was automatically generated by TestProject
    Project: Bloomy_Core
    Package: TestProject.Generated.Tests.BloomyCore
    Test: UpdateItemPrice_TestCase
    Generated by: Rahul Prakash (rahulprakash0862@gmail.com)
    Generated on 05/28/2021, 06:24:10
"""


@pytest.fixture()
def driver():
    driver = webdriver.Chrome(token="5o-UXmLZug6gaKmDcoeI6tT7NM19XyG1qnolFybLul4",
                              project_name="Bloomy_Core",
                              job_name="UpdateItemPrice_TestCase")
    step_settings = StepSettings(timeout=15000,
                                 sleep_time=500,
                                 sleep_timing_type=SleepTimingType.Before)
    with DriverStepSettings(driver, step_settings):
        yield driver
    driver.quit()


@report_assertion_errors
def test_main(driver):
    """Generated By:Rahul."""
    # Test Parameters
    # Auto generated application URL parameter
    ApplicationURL = "https://epitest-demo.bloomstack.io/"

    # 1. Navigate to '{ApplicationURL}'
    # Navigates the specified URL (Auto-generated)
    driver.get(f'{ApplicationURL}')

    # 2. Does 'Login' contain 'Login'?
    login = driver.find_element(By.XPATH,
                                "//a[. = 'Login']")
    step_output = login.text
    assert step_output and ("Login" in step_output)

    # 3. Click 'Login'
    login = driver.find_element(By.XPATH,
                                "//a[. = 'Login']")
    login.click()

    # 4. Click 'Email Address'
    email_address = driver.find_element(By.CSS_SELECTOR,
                                        "#login_email")
    email_address.click()

    # 5. Type 'testautomationuser@bloomstack.com' in 'Email Address'
    email_address = driver.find_element(By.CSS_SELECTOR,
                                        "#login_email")
    email_address.send_keys("testautomationuser@bloomstack.com")

    # 6. Click 'Password'
    password = driver.find_element(By.CSS_SELECTOR,
                                   "#login_password")
    password.click()

    # 7. Type 'epi@123' in 'Password'
    password = driver.find_element(By.CSS_SELECTOR,
                                   "#login_password")
    password.send_keys("epi@123")

    # 8. Click 'Login1'
    login1 = driver.find_element(By.XPATH,
                                 "//button[. = '\n\t\t\t\tLogin']")
    login1.click()

    # 9. Click 'Search or type a command (Ctrl + G)'
    search_or_type_a_command_ctrl_g_ = driver.find_element(By.CSS_SELECTOR,
                                                           "#navbar-search")
    search_or_type_a_command_ctrl_g_.click()

    # 10. Type 'itemprice' in 'Search or type a command (Ctrl + G)'
    search_or_type_a_command_ctrl_g_ = driver.find_element(By.CSS_SELECTOR,
                                                           "#navbar-search")
    search_or_type_a_command_ctrl_g_.send_keys("itemprice")

    # 11. Click 'Item Price List'
    item_price_list = driver.find_element(By.XPATH,
                                          "//p[. = 'Item Price List']")
    item_price_list.click()
    time.sleep(2)

    # 12. Does 'Item Price1' contain 'Item Price'?
    item_price1 = driver.find_element(By.XPATH,
                                      "//div[. = 'Item Price']")
    step_output = item_price1.text
    assert step_output and ("Item Price" in step_output)
    time.sleep( 2 )

    # 13. Click 'INPUT87'
    input87 = driver.find_element(By.XPATH,
                                  "(//input[@class='level-item list-row-checkbox hidden-xs'])[1]")
    driver.execute_script( "arguments[0].click();", input87 )

    # 14. Click 'SPAN11'
    span11 = driver.find_element(By.XPATH,
                                 "//div[2]/button/span/span[2]")
    span11.click()

    # 15. Click 'Edit'
    edit = driver.find_element(By.XPATH,
                               "//a[. = '\n\t\t\t\tEdit']")
    edit.click()

    # 16. Click 'SELECT8'
    select8 = driver.find_element(By.XPATH,
                                  "//select")
    select8.click()

    # 17. Select the 'Rate' option in 'SELECT8'
    select8 = driver.find_element(By.XPATH,
                                  "//select")
    Select(select8).select_by_value("Rate")

    # 18. Click 'SELECT8'
    select8 = driver.find_element(By.XPATH,
                                  "//select")
    select8.click()

    # 19. Click 'INPUT8'
    input8 = driver.find_element(By.XPATH,
                                 "//form/div[2]//input")
    input8.click()

    # 20. Type '59.00' in 'INPUT8'
    input8 = driver.find_element(By.XPATH,
                                 "//form/div[2]//input")
    input8.send_keys("59.00")

    # 21. Click 'Update'
    update = driver.find_element(By.XPATH,
                                 "//button[. = 'Update']")
    update.click()

    # 22. Does 'Updated successfully7' contain 'Updated successfully'?
    updated_successfully7 = driver.find_element(By.XPATH,
                                                "//div[. = 'Updated successfully']")
    step_output = updated_successfully7.text
    assert step_output and ("Updated successfully" in step_output)

    # 23. Click 'Settings2'
    settings2 = driver.find_element(By.XPATH,
                                    "//span[. = '      Settings']")
    settings2.click()

    # 24. Click 'Logout'
    logout = driver.find_element(By.XPATH,
                                 "//a[. = '       Logout']")
    logout.click()

    # 25. Does 'Login' contain 'Login'?
    login = driver.find_element(By.XPATH,
                                "//a[. = 'Login']")
    step_output = login.text
    assert step_output and ("Login" in step_output)

3ffc86239123754e5481a99a3f176d07a90f5525
<mask token>

<mask token>


@pytest.fixture()
def driver():
    driver = webdriver.Chrome(token=
        '5o-UXmLZug6gaKmDcoeI6tT7NM19XyG1qnolFybLul4', project_name=
        'Bloomy_Core', job_name='UpdateItemPrice_TestCase')
    step_settings = StepSettings(timeout=15000, sleep_time=500,
        sleep_timing_type=SleepTimingType.Before)
    with DriverStepSettings(driver, step_settings):
        yield driver
    driver.quit()


<mask token>

<mask token>


@pytest.fixture()
def driver():
    driver = webdriver.Chrome(token=
        '5o-UXmLZug6gaKmDcoeI6tT7NM19XyG1qnolFybLul4', project_name=
        'Bloomy_Core', job_name='UpdateItemPrice_TestCase')
    step_settings = StepSettings(timeout=15000, sleep_time=500,
        sleep_timing_type=SleepTimingType.Before)
    with DriverStepSettings(driver, step_settings):
        yield driver
    driver.quit()


@report_assertion_errors
def test_main(driver):
    """Generated By:Rahul."""
    ApplicationURL = 'https://epitest-demo.bloomstack.io/'
    driver.get(f'{ApplicationURL}')
    login = driver.find_element(By.XPATH, "//a[. = 'Login']")
    step_output = login.text
    assert step_output and 'Login' in step_output
    login = driver.find_element(By.XPATH, "//a[. = 'Login']")
    login.click()
    email_address = driver.find_element(By.CSS_SELECTOR, '#login_email')
    email_address.click()
    email_address = driver.find_element(By.CSS_SELECTOR, '#login_email')
    email_address.send_keys('testautomationuser@bloomstack.com')
    password = driver.find_element(By.CSS_SELECTOR, '#login_password')
    password.click()
    password = driver.find_element(By.CSS_SELECTOR, '#login_password')
    password.send_keys('epi@123')
    login1 = driver.find_element(By.XPATH, """//button[. = '
				Login']""")
    login1.click()
    search_or_type_a_command_ctrl_g_ = driver.find_element(By.CSS_SELECTOR,
        '#navbar-search')
    search_or_type_a_command_ctrl_g_.click()
    search_or_type_a_command_ctrl_g_ = driver.find_element(By.CSS_SELECTOR,
        '#navbar-search')
    search_or_type_a_command_ctrl_g_.send_keys('itemprice')
    item_price_list = driver.find_element(By.XPATH,
        "//p[. = 'Item Price List']")
    item_price_list.click()
    time.sleep(2)
    item_price1 = driver.find_element(By.XPATH, "//div[. = 'Item Price']")
    step_output = item_price1.text
    assert step_output and 'Item Price' in step_output
    time.sleep(2)
    input87 = driver.find_element(By.XPATH,
        "(//input[@class='level-item list-row-checkbox hidden-xs'])[1]")
    driver.execute_script('arguments[0].click();', input87)
    span11 = driver.find_element(By.XPATH, '//div[2]/button/span/span[2]')
    span11.click()
    edit = driver.find_element(By.XPATH, """//a[. = '
				Edit']""")
    edit.click()
    select8 = driver.find_element(By.XPATH, '//select')
    select8.click()
    select8 = driver.find_element(By.XPATH, '//select')
    Select(select8).select_by_value('Rate')
    select8 = driver.find_element(By.XPATH, '//select')
    select8.click()
    input8 = driver.find_element(By.XPATH, '//form/div[2]//input')
    input8.click()
    input8 = driver.find_element(By.XPATH, '//form/div[2]//input')
    input8.send_keys('59.00')
    update = driver.find_element(By.XPATH, "//button[. = 'Update']")
    update.click()
    updated_successfully7 = driver.find_element(By.XPATH,
        "//div[. = 'Updated successfully']")
    step_output = updated_successfully7.text
    assert step_output and 'Updated successfully' in step_output
    settings2 = driver.find_element(By.XPATH, "//span[. = '      Settings']")
    settings2.click()
    logout = driver.find_element(By.XPATH, "//a[. = '       Logout']")
    logout.click()
    login = driver.find_element(By.XPATH, "//a[. = 'Login']")
    step_output = login.text
    assert step_output and 'Login' in step_output

import time
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
from src.testproject.classes import DriverStepSettings, StepSettings
from src.testproject.decorator import report_assertion_errors
from src.testproject.enums import SleepTimingType
from src.testproject.sdk.drivers import webdriver
import pytest
<mask token>


@pytest.fixture()
def driver():
    driver = webdriver.Chrome(token=
        '5o-UXmLZug6gaKmDcoeI6tT7NM19XyG1qnolFybLul4', project_name=
        'Bloomy_Core', job_name='UpdateItemPrice_TestCase')
    step_settings = StepSettings(timeout=15000, sleep_time=500,
        sleep_timing_type=SleepTimingType.Before)
    with DriverStepSettings(driver, step_settings):
        yield driver
    driver.quit()


@report_assertion_errors
def test_main(driver):
    """Generated By:Rahul."""
    ApplicationURL = 'https://epitest-demo.bloomstack.io/'
    driver.get(f'{ApplicationURL}')
    login = driver.find_element(By.XPATH, "//a[. = 'Login']")
    step_output = login.text
    assert step_output and 'Login' in step_output
    login = driver.find_element(By.XPATH, "//a[. = 'Login']")
    login.click()
    email_address = driver.find_element(By.CSS_SELECTOR, '#login_email')
    email_address.click()
    email_address = driver.find_element(By.CSS_SELECTOR, '#login_email')
    email_address.send_keys('testautomationuser@bloomstack.com')
    password = driver.find_element(By.CSS_SELECTOR, '#login_password')
    password.click()
    password = driver.find_element(By.CSS_SELECTOR, '#login_password')
    password.send_keys('epi@123')
    login1 = driver.find_element(By.XPATH, """//button[. = '
				Login']""")
    login1.click()
    search_or_type_a_command_ctrl_g_ = driver.find_element(By.CSS_SELECTOR,
        '#navbar-search')
    search_or_type_a_command_ctrl_g_.click()
    search_or_type_a_command_ctrl_g_ = driver.find_element(By.CSS_SELECTOR,
        '#navbar-search')
    search_or_type_a_command_ctrl_g_.send_keys('itemprice')
    item_price_list = driver.find_element(By.XPATH,
        "//p[. = 'Item Price List']")
    item_price_list.click()
    time.sleep(2)
    item_price1 = driver.find_element(By.XPATH, "//div[. = 'Item Price']")
    step_output = item_price1.text
    assert step_output and 'Item Price' in step_output
    time.sleep(2)
    input87 = driver.find_element(By.XPATH,
        "(//input[@class='level-item list-row-checkbox hidden-xs'])[1]")
    driver.execute_script('arguments[0].click();', input87)
    span11 = driver.find_element(By.XPATH, '//div[2]/button/span/span[2]')
    span11.click()
    edit = driver.find_element(By.XPATH, """//a[. = '
				Edit']""")
    edit.click()
    select8 = driver.find_element(By.XPATH, '//select')
    select8.click()
    select8 = driver.find_element(By.XPATH, '//select')
    Select(select8).select_by_value('Rate')
    select8 = driver.find_element(By.XPATH, '//select')
    select8.click()
    input8 = driver.find_element(By.XPATH, '//form/div[2]//input')
    input8.click()
    input8 = driver.find_element(By.XPATH, '//form/div[2]//input')
    input8.send_keys('59.00')
    update = driver.find_element(By.XPATH, "//button[. = 'Update']")
    update.click()
    updated_successfully7 = driver.find_element(By.XPATH,
        "//div[. = 'Updated successfully']")
    step_output = updated_successfully7.text
    assert step_output and 'Updated successfully' in step_output
    settings2 = driver.find_element(By.XPATH, "//span[. = '      Settings']")
    settings2.click()
    logout = driver.find_element(By.XPATH, "//a[. = '       Logout']")
    logout.click()
    login = driver.find_element(By.XPATH, "//a[. = 'Login']")
    step_output = login.text
    assert step_output and 'Login' in step_output

import time

from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
from src.testproject.classes import DriverStepSettings, StepSettings
from src.testproject.decorator import report_assertion_errors
from src.testproject.enums import SleepTimingType
from src.testproject.sdk.drivers import webdriver
import pytest


"""
This pytest test was automatically generated by TestProject
    Project: Bloomy_Core
    Package: TestProject.Generated.Tests.BloomyCore
    Test: UpdateItemPrice_TestCase
    Generated by: Rahul Prakash (rahulprakash0862@gmail.com)
    Generated on 05/28/2021, 06:24:10
"""


@pytest.fixture()
def driver():
    driver = webdriver.Chrome(token="5o-UXmLZug6gaKmDcoeI6tT7NM19XyG1qnolFybLul4",
                              project_name="Bloomy_Core",
                              job_name="UpdateItemPrice_TestCase")
    step_settings = StepSettings(timeout=15000,
                                 sleep_time=500,
                                 sleep_timing_type=SleepTimingType.Before)
    with DriverStepSettings(driver, step_settings):
        yield driver
    driver.quit()


@report_assertion_errors
def test_main(driver):
    """Generated By:Rahul."""
    # Test Parameters
    # Auto generated application URL parameter
    ApplicationURL = "https://epitest-demo.bloomstack.io/"

    # 1. Navigate to '{ApplicationURL}'
    # Navigates the specified URL (Auto-generated)
    driver.get(f'{ApplicationURL}')

    # 2. Does 'Login' contain 'Login'?
    login = driver.find_element(By.XPATH,
                                "//a[. = 'Login']")
    step_output = login.text
    assert step_output and ("Login" in step_output)

    # 3. Click 'Login'
    login = driver.find_element(By.XPATH,
                                "//a[. = 'Login']")
    login.click()

    # 4. Click 'Email Address'
    email_address = driver.find_element(By.CSS_SELECTOR,
                                        "#login_email")
    email_address.click()

    # 5. Type 'testautomationuser@bloomstack.com' in 'Email Address'
    email_address = driver.find_element(By.CSS_SELECTOR,
                                        "#login_email")
    email_address.send_keys("testautomationuser@bloomstack.com")

    # 6. Click 'Password'
    password = driver.find_element(By.CSS_SELECTOR,
                                   "#login_password")
    password.click()

    # 7. Type 'epi@123' in 'Password'
    password = driver.find_element(By.CSS_SELECTOR,
                                   "#login_password")
    password.send_keys("epi@123")

    # 8. Click 'Login1'
    login1 = driver.find_element(By.XPATH,
                                 "//button[. = '\n\t\t\t\tLogin']")
    login1.click()

    # 9. Click 'Search or type a command (Ctrl + G)'
    search_or_type_a_command_ctrl_g_ = driver.find_element(By.CSS_SELECTOR,
                                                           "#navbar-search")
    search_or_type_a_command_ctrl_g_.click()

    # 10. Type 'itemprice' in 'Search or type a command (Ctrl + G)'
    search_or_type_a_command_ctrl_g_ = driver.find_element(By.CSS_SELECTOR,
                                                           "#navbar-search")
    search_or_type_a_command_ctrl_g_.send_keys("itemprice")

    # 11. Click 'Item Price List'
    item_price_list = driver.find_element(By.XPATH,
                                          "//p[. = 'Item Price List']")
    item_price_list.click()
    time.sleep(2)

    # 12. Does 'Item Price1' contain 'Item Price'?
    item_price1 = driver.find_element(By.XPATH,
                                      "//div[. = 'Item Price']")
    step_output = item_price1.text
    assert step_output and ("Item Price" in step_output)
    time.sleep( 2 )

    # 13. Click 'INPUT87'
    input87 = driver.find_element(By.XPATH,
                                  "(//input[@class='level-item list-row-checkbox hidden-xs'])[1]")
    driver.execute_script( "arguments[0].click();", input87 )

    # 14. Click 'SPAN11'
    span11 = driver.find_element(By.XPATH,
                                 "//div[2]/button/span/span[2]")
    span11.click()

    # 15. Click 'Edit'
    edit = driver.find_element(By.XPATH,
                               "//a[. = '\n\t\t\t\tEdit']")
    edit.click()

    # 16. Click 'SELECT8'
    select8 = driver.find_element(By.XPATH,
                                  "//select")
    select8.click()

    # 17. Select the 'Rate' option in 'SELECT8'
    select8 = driver.find_element(By.XPATH,
                                  "//select")
    Select(select8).select_by_value("Rate")

    # 18. Click 'SELECT8'
    select8 = driver.find_element(By.XPATH,
                                  "//select")
    select8.click()

    # 19. Click 'INPUT8'
    input8 = driver.find_element(By.XPATH,
                                 "//form/div[2]//input")
    input8.click()

    # 20. Type '59.00' in 'INPUT8'
    input8 = driver.find_element(By.XPATH,
                                 "//form/div[2]//input")
    input8.send_keys("59.00")

    # 21. Click 'Update'
    update = driver.find_element(By.XPATH,
                                 "//button[. = 'Update']")
    update.click()

    # 22. Does 'Updated successfully7' contain 'Updated successfully'?
    updated_successfully7 = driver.find_element(By.XPATH,
                                                "//div[. = 'Updated successfully']")
    step_output = updated_successfully7.text
    assert step_output and ("Updated successfully" in step_output)

    # 23. Click 'Settings2'
    settings2 = driver.find_element(By.XPATH,
                                    "//span[. = '      Settings']")
    settings2.click()

    # 24. Click 'Logout'
    logout = driver.find_element(By.XPATH,
                                 "//a[. = '       Logout']")
    logout.click()

    # 25. Does 'Login' contain 'Login'?
    login = driver.find_element(By.XPATH,
                                "//a[. = 'Login']")
    step_output = login.text
    assert step_output and ("Login" in step_output)
