testproject-io / python-opensdk

TestProject OpenSDK for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Driver auto commands reporting - Value of element action is not reported in the step description

gileli121 opened this issue · comments

Expected Behavior

  • The step description should be Type sometext in #my_id
  • The value should not be array

Current Behavior

The step description is
image
And it's value is
image

Possible Solution

If I change the line from

driver.find_element(By.CSS_SELECTOR, "#my_id").send_keys("sometext")

To

driver.find_element(By.CSS_SELECTOR, "#my_id").send_keys("some text")

Then the value is written in the description:
image

For some reason, it must be 2 words for it to work.

Steps to Reproduce

Try to run the code:

from selenium.webdriver.common.by import By
from src.testproject.sdk.drivers.webdriver import Chrome


def test_driver_auto_command_report_find_element_strategies():
    driver = Chrome(projectname="python sdk project",
                    jobname="driver_auto_command_report_find_element_strategies",
                    disable_reports=False)

    def driver_draw_html_code(html_code):
        driver.execute_script("document.write('" + html_code.replace("'", r"\'").replace("\n", "") + "')")

    driver_draw_html_code("<input class='my_class' id='my_id'>")

    # CSS Selector
    driver.find_element(By.CSS_SELECTOR, "#my_id").send_keys("sometext")

    driver.quit()

    print("Done")

Context (Environment)

Windows 10
Agent 0.63.1
Latest SDK version

Detailed Description

The first issue is that the value must be 2 words in order that the step will contain the value in the description.
The second issue is that for some reason the value is an array.

Thanks. @mstrelex isn't this something we discussed should be addressed in the Agent? We've talked about this before..

Indeed Agent related, fixing in Agent 0.63.4