robotframework-browser: Python script promise_to always got error "No library '' found."
Describe the bug Python script promise_to always got error “No library ‘<Browser.browser.Browser object at 0x…>’ found.”
To Reproduce test.py
from robot.api.deco import keyword
from Browser import Browser
@keyword
def test_keyword():
lib = Browser()
lib.new_browser(headless=False)
lib.new_page(url='http://www.google.com')
promise = lib.promise_to('Wait For Response')
body = lib.wait_for(promise)
test.robot
*** Settings ***
Library test.py
*** Test Cases ***
Test
Test Keyword
test.robot result
==============================================================================
Test
==============================================================================
Test | FAIL |
No library '<Browser.browser.Browser object at 0x000001B127FC01F0>' found.
------------------------------------------------------------------------------
Test | FAIL |
1 test, 0 passed, 1 failed
==============================================================================
Expected behavior Run keyword succeed and the promise_to works properly
Desktop (please complete the following information):
- OS: Windows 10
- Browser: chrome
- Version: robotframework-browser==11.1.1
Additional context Use the “Promise To” in robot file, the test can be executed and pass properly
test2.robot
*** Settings ***
Library Browser
*** Test Cases ***
Test
New Browser
New Page url=http://www.google.com
${promise}= Promise To Wait For Response
${body}= Wait For ${promise}
test2.robot result
==============================================================================
Test2
==============================================================================
Test | PASS |
------------------------------------------------------------------------------
Test2 | PASS |
1 test, 1 passed, 0 failed
==============================================================================
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (8 by maintainers)
Commits related to this issue
- Adding acceptance test for issue #1685 — committed to luchoagomezt/robotframework-browser by luchoagomezt 2 years ago
- Fixing issue #1685, "No library '<Browser.browser.Browser object at 0x...>' found." (#1806) Co-authored-by: Luis Gomez <Luis.Gomez1@telus.com> — committed to MarketSquare/robotframework-browser by luchoagomezt 2 years ago
@aaltat
I’ve put up a pull request to add @Massukio! 🎉