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.

Wait for response matchers not working

See original GitHub issue

Describe the bug I want this to return the result of route search. So ${r} should be that result. And matcher should work as a JS regexp.

To Reproduce

*** Settings ***
Library  Browser
Suite Setup  New Browser   headless=${False}

*** Test Cases ***
Graphhopper
   New Page    https://graphhopper.com/maps/
   wait until network is idle  timeout=5s
   type text  //*[@id="0_Input"]  Turku
   type text  //*[@id="1_Input"]  Helsinki
   wait until network is idle  timeout=5s
   ${p}=   promise to  wait for response  matcher=/.*\/api\/1.*/  timeout=5s
   Click   \#searchButton
   ${r}=  wait for  ${p}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
vincenzo-gasparocommented, Dec 14, 2020

Ok I tried \\ to escape ? and it didn’t work, but \\\\? works, I don’t know if it’s the expected behavior but at least I solved the problem!

1reaction
mkorpelacommented, Oct 20, 2020

This now works after https://github.com/MarketSquare/robotframework-browser/pull/432

*** Settings ***
Library  Browser
Suite Setup  New Browser   headless=${False}

*** Test Cases ***
Graphhopper
   New Page    https://graphhopper.com/maps/
   wait until network is idle  timeout=5s
   type text  //*[@id="0_Input"]  Turku
   type text  //*[@id="1_Input"]  Helsinki
   wait until network is idle  timeout=5s
   ${p}=   promise to  wait for response  matcher=/api/1/  timeout=5s
   Click   \#searchButton
   ${r}=  wait for  ${p}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Wait for response matcher example - Robot Framework
Hello, In my test I am trying to catch the end of action triggered by a click before moving on. Using javascript +...
Read more >
React Testing Library's waitFor not working - Stack Overflow
I found the answer here: React Testing Library - using 'await wait()' after fireEvent. TLDR: "You can not use wait with getBy*.
Read more >
Waiting matcher · Issue #580 · rspec/rspec-expectations - GitHub
I'd like to propose to add a matcher that will retry given block until it will match all other matchers or time expired....
Read more >
I received an error that my name, date of ... - Federal Student Aid
I received an error that my name, date of birth, and Social Security number listed on the FAFSA form do not match my...
Read more >
Using Service Workers - Web APIs | MDN
This article provides information on getting started with service workers, including basic architecture, registering a service worker, ...
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