Track tasks and feature requests
- Coide Error Flash Driver Function Execute Timeout Stm32
- Flash Driver Update
- Coide Error Flash Driver Function Execute Timeout Coocox
- Code Error Flash Driver Function Execute Time Outage
Comments
commented Mar 13, 2014
Hi I want to write a Protractor test that waits until the current URL to change, so I have been looking at browser.wait() , combined with browser.getCurrentUrl() .However, I am not sure of how to use the two together: the browser.wait() method accepts as its first parameter a function that will return a boolean value – however, browser.getCurrentUrl() returns a promise.My first attempt, which failed (as I expected), looks like this: Can anyone help? many thanks Matt |
commented Mar 13, 2014
How is this failing? Is it a too early timeout issue? I can't find in the docs what's the default timeout when no timeout param is specified in browser.wait() |
commented Mar 13, 2014
It times out after 30s (as I set in my protractor.conf.js file) – which seems to indicate that the browser.wait() never returns.I tried again, this time specifying a timeout parameter of 12000 – all the tests timed out again, this time after 12 seconds. |
commented Mar 13, 2014
I can't recall exactly why but at some point i had to switch from browser.getCurrentUrl() to browser.driver.getCurrentUrl() and even created this helper function: |
commented Mar 13, 2014
Great, thanks Leo! I'll give that a go. If it works, I'll suggest a document change to @juliemr :-) |
commented Mar 13, 2014
Hmmm... looks like I was right originally – using browser.getCurrentUrl() and browser.wait() are working fine for me at the moment:However, I am running into problems when I try to use getText() in a similar fashion:It works sometimes, but on other times it fails with this message: StaleElementReferenceError: stale element reference: element is not attached to the page document So what I think is causing the error is that by the time the call to getText() is executed, the contents of the element changed, thereby making the reference to it stale.What do you think? And can you suggest any workaround? (@juliemr?) |
commented Mar 14, 2014
Reference for testing the URL: https://github.com/angular/protractor/blob/master/spec/withLoginConf.js#L24 For the second question (getText), I'm guessing that your methodThatReturnsWebElementViaPromise is only getting called one time (because the promise is resolved once and then later invocations just return the value), instead of being called every time. It seems like you want to re-find the element every time? |
commented Mar 14, 2014
Ok, I ended up finding a solution: You can see that I call the element(by.id(elementId)).getText() a second time, in the error handler for the first time – this is because I consistently found that StaleElementReferenceError s would be thrown, and very unpredictably (but sometimes not at all).I'm guessing this is because of some kind of race condition: in the time between the calls to element(by.id(elementId)) and getText() , Angular had updated the DOM with a new value – just guesswork though.So it's not an ideal solution, but it works consistently. And if I understand it correctly, any error that occurs on the second getText() call will be propagated back up the chain.Note also that I simplified my code so that I'm only dealing with a DOM ID, and no longer needing to use the method that returned a promise. |
commented Mar 18, 2014
In case it may help others in future, here is the method I have written to wait for the URL to change to a particular value (as specified by a regex) : |
commented Apr 25, 2014
Thanks @mcalthrop, both functions work pretty well! |
commented Apr 27, 2014
Excellent! Glad they helped. |
commented Aug 12, 2014
Thanks for this @mcalthrop these two functions have proved to be very helpful. |
commented Apr 9, 2015
Great thanks @mcalthrop |
commented Apr 14, 2015
Thanks, @mcalthrop. Very helpful. |
commented Jun 3, 2015
Can anyone of you please explain me how to write 'pageLoadTimeout()' for selenium webdriver on Node.JS by Jasmine? Thanks. |
commented Aug 19, 2015
This worked very well for me |
commented Apr 4, 2016
I had to use browser.driver.wait and browser.driver.getCurrentUrl |
commented Sep 16, 2016
Unable to use the @juliemr wait for url after login promise https://github.com/angular/protractor/blob/master/spec/withLoginConf.js#L28 with @mattfritz cucumber framework https://github.com/mattfritz/protractor-cucumber-framework If the promise and the test passed there is no problem and everything works pretty good. The problem is when the promise fail testing process stop and others test won't run. Any idea to keep the process running? This test fail but the other could pass. For example: |
commented Sep 16, 2016
@aluzardo When you are using protractor-cucumber framework it is advisable to use cucumberjs timeouts rather than protractor's wait's, You have to increase you default timeout for such scenarios, basically when the promise is not resolved in the specific default time i.e 5000 ms currently in cucumberJS , you would get such an exception. So I would suggest you increase setDefaultTimeout : 60 * 1000 at the global level so that your promises get enough time be resolved and your scripts would be running! |
commented Sep 16, 2016
Thanks @idaneliz I increased the time some time ago https://github.com/aluzardo/protractor-cucumber-tests/blob/master/features/support/env.js I tried to increase more the time but I got the same error. |
commented Sep 16, 2016
@aluzardo There is no issue with your setup. Instead of using callbacks, you should return your promises, cucumberjs supports promises, It's just that your scenario takes some time to get resolved, so your step definition should know that, currently it waits for the callback. For more details please checkout these SO threads - protractor cucumber tests shown passed configure protractor with cucumber It's more of a support question , you would get answers at faster pace if you raise it in Stackoverflow or Gitter! |
commented Sep 16, 2016
@idaneliz@juliemr and @mattfritz I found that if I use the 3.3.0 protractor version everything work pretty good. The problem is using the version ^4.0.2 It is the only clue that I could found. I am going to use the 3.3.0 protractor as a temporary fix. |
commented Oct 31, 2016
I have noticed the browser.wait commands broken after upgrading to 4.0.4 as well. @juliemr any ideas? These were working perfectly with the older version of protractor. |
commented Nov 1, 2016 • edited by heathkit
edited by heathkit
Ok, I know this is way way late but I believe you can do something like this: |
commented May 6, 2017
Thanks @pittgoose , it works for me. I spent few days to search for solution. |
Coide Error Flash Driver Function Execute Timeout Stm32
commented Feb 25, 2019
You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us |
Code Example
SQL = 'use TWO';
status = SQL_Execute(SQL_connection, SQL);
if status = 0 then
SQL = 'select CUSTNMBR from RM00101';
status = SQL_Execute(SQL_connection, SQL);
{get all customer numbers in customer master and add to temp table.}
if status = 0 then
status = SQL_FetchNext(SQL_connection);
while status <> 31 do
clear table myTempTable;
SQL_GetData(SQL_connection,1,'Master ID' of table myTempTable);
save table myTempTable;
status = SQL_FetchNext(SQL_connection);
end while;
end if;
status = SQL_Execute(SQL_connection, SQL);
{get all vendors add to temp table.}
if status = 0 then
status = SQL_FetchNext(SQL_connection);
while status <> 31 do
clear table myTempTable;
SQL_GetData(SQL_connection,1,'Master ID' of table myTempTable);
save table myTempTable;
status = SQL_FetchNext(SQL_connection);
end while;
end if;
end if;
What I would find is that my table wouldn't be populated with the Vendor ID values.
Debugging this (or adding the call to SQL_GetError()) I'd find that the second SQL_Execute() function is what is failing with the error noted.
Why does this happen?
The reason is that I have returned a recordset from the second call.