Open SmaugRon opened 6 years ago
NB Tried on FireFox too...same error. BUT getting a console error that might be a clue?
- Failed: java.net.SocketException: Software caused connection abort: recv failed
it('should check when new page is loaded', function () {
button.click().then(function () {
browser.getCurrentUrl();
browser.getTitle().then(function (title) {
expect(title).toEqual('https://obmng.dbm.guestline.net/availability?hotel=OBMNG4&arrival=');
return expect(newElement.isDisplayed()).toBeTruthy();
Could you post a more complete code sample? Also, be careful with Github's formatting. It removed all the whitespace from your snippet.
A few things about this sample stand out to me:
browser.getCurrentUrl();
but not wait for the promise to resolve and do nothing with the result?browser.getCurrentUrl();
and browser.getTitle()
?expect
?I wouldn't expect any of this to cause the error you've described so long as you haven't disabled selenium's promise manager (SELENIUM_PROMISE_MANAGER: false
), but perhaps your error is caused by a similar issue elsewhere in your test.
We have a small hotel booking app for which I have written a simple automated smoke-test based on an E2E flow.
Select hotel > Choose Start Date > Choose End Date > Select no of Adults > Select No of Children > Enter Promo code > Click Search. From the offered hotels, click Submit to return room availability and costs.
Works fine when run by a user and also fine under an automated test UNTIL the last Submit action - the results page frame loads, then there is a 'wait' wheel followed by an error message stating the hotel's availability is not available!
Browser.wait - of many different times.
Expected Condition (wait for the page to load)
Var V = element(by.xpath........... V.submit ..that generates no element found on the form (I don't think the page in question IS a form so I'm not surprised!
Below is the last straw clutched!
it('should check when new page is loaded', function () { button.click().then(function (){ browser.getCurrentUrl(); browser.getTitle().then(function (title) { expect(title).toEqual('https://obmng.dbm.guestline.net/availability?hotel=OBMNG4&arrival='); return expect(newElement.isDisplayed()).toBeTruthy();
Has anyone got anything I could try or perhaps can explain this behaviour difference?
Thanks David
Bug report