Skip to content

RF version 4 and above:Suspended due to logged failure: ValueError: Argument 'timeout' got value '0.5s' that cannot be converted to None.  #4407

@ac57486

Description

@ac57486

In RF version 4 and above, I am getting exception when using "Wait Until Page Contains Element" inside run_keyword_and_return_status as given below :

result = BuiltIn().run_keyword_and_return_status("Wait Until Page Contains Element", element, '0.5s')

Suspended due to logged failure: ValueError: Argument 'timeout' got value '0.5s' that cannot be converted to None.
Not getting this error in earlier version 3.2.2.

But this works fine if I use wait_until_page_contains_element:
sl = BuiltIn().get_library_instance('SeleniumLibrary')
sl.wait_until_page_contains_element(element, '0.5s')

Example:

*** Keywords ***
Wait Until Page Contains One Of The Elements    ${sfc_lnk_element1}    ${sfc_lnk_element2} 

Python Library

@keyword
def wait_until_page_contains_one_of_the_elements(*elements, timeout=10):
    result = False
    count = len(elements)
    for index in range(0, int(timeout), int(count*0.5)):
        for element in elements:
            result = BuiltIn().run_keyword_and_return_status("SeleniumLibrary.Wait Until Page Contains Element", element, '0.5s')
            if result:
                break
    if not result:
        BuiltIn().fail('Page could not find any of the elements specified')

Please help me with this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions