question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python script promise_to always got error "No library '<Browser.browser.Browser object at 0x...>' found."

See original GitHub issue

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
==============================================================================

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
allcontributors[bot]commented, Jan 21, 2022

@aaltat

I’ve put up a pull request to add @Massukio! 🎉

0reactions
aaltatcommented, Apr 2, 2022

Done in #1685

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'Browser' object has no attribute 'manager ...
I'm using Python 2.7, thanks for the help! python · spynner · Share. Share a link ...
Read more >
Browser - MarketSquare
Browser library is a browser automation library for Robot Framework. This is the keyword documentation for Browser library.
Read more >
Promise To Wait For Download never finished · Issue #914
If you test is written like that, Browser, Context and Page are opened in same test, then download should work, but for some...
Read more >
Having Promise error from third-party library by using ...
We have used browser agent code in our stencil js app. But its create issue in jspdf library which we have use for...
Read more >
Intro to PyScript: Run Python in the browser
Learn how to deploy Python code in the browser using PyScript, a new library that builds of Pyodide and ports CPython to Wasm....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found