Unable to test toast message using protractor - protractor

DOM for the toast message that i want to test is,
I tried the below code
When I run this code, I see the below error though it is able to locate the toast message. Please help me resolve this issue.
add_Button_loc = element(by.xpath("//button[#type='submit'][contains(text(),'Add')]"));
browser.wait(EC.elementToBeClickable(add_Button_loc), 5000);
expect(add_Button_loc.isPresent()).toBe(true);
toastmsg = element(by.tagName("p-growl")).$('[value="aaa Batch saved successfully"]');
add_Button_loc.click();
expect(toastmsg.isPresent()).toBe(true);
[10:17:26] W/element - more than one element found for locator By(css selector, p-growl) - the first result will be used
Failures:
1) ManageBatch Test Add Batch
Message:
Expected false to be true.
Stack:
Error: Failed expectation
at UserContext. (C:\Users\sarav\AppData\Roaming\npm\node_modules\protractor\example\manageBatch.js:43:32)
at C:\Users\sarav\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:112:25
at new ManagedPromise (C:\Users\sarav\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1077:7)
at ControlFlow.promise (C:\Users\sarav\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2505:12)
at schedulerExecute (C:\Users\sarav\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:95:18)
at TaskQueue.execute_ (C:\Users\sarav\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_

Related

Getting error Liquibase validation failed because checkum has changed in GITHUB Actions

I am getting the error Liquibase checksum validation failed.
Error
Unexpected error running Liquibase: Validation Failed:
1 change sets check sum
changelog.sql::3::snowflake was: 8:f97afb605f986bcfcc0d3e4ecf5208e6 but is now: 8:a10040290479269659939671e8a14db0
AnyIdea how to debug this issue in GITHUB Action and Runner.
delete the record for checksum value for that I was getting the error and It is resolved now.

FLTFirebaseMessaging: An error occurred while calling method Messaging#getToken, errorOrNil { NSLocalizedFailureReason = "Too many server requests.";}

I had removed my IOS folder and re-added it with flutter create . --platforms iOS .Did this as I was receiving some error and saw this was the solution for it. I tried adding firebase again and I am getting this error:
FLTFirebaseMessaging: An error occurred while calling method Messaging#getToken, errorOrNil => {
NSLocalizedFailureReason = "Too many server requests.";
}
flutter: null
[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: [firebase_messaging/unknown] An unknown error has occurred.
I checked my bundleID it matches exactly and I added google service info plist file.
I have to done these steps multiple times but still receive this error.
Any suggestions regarding this will be greatly appreciated.App working completely fine on android

Cypress: How can I solve error: Timed out retrying: cy.select() failed because this element: is being covered by another element:?

Every time when the command starts executing, page scroll down so the required element is not visible and it's hidden under the menu on the page and there is an error message Timed out retrying: cy.select() failed because this element: is being covered by another element:.
That command looks just like this
cy.get('select').select('2').
So can anyone help me how to solve this error? I tried to use commands .scrollTo() or .scrollIntoView() but it didn't help either.

How to configure jasmine to logout message when expect was failed

I have a Jasmine check point to check the expect error message, and when the check point was failed, I only get the following message:
Error: Failed expectation
Question is, is there any configuration to let jasmine output the actual message?
expect(messageInfo).toContain("unauthorized");

Karate UI Automation - Assertion fails with message "actual value is not JSON-like" for driver.title comparison

I am trying to use karate for UI automation but I am stuck with one basic scenario where I am trying to validate the page title
Below are my scenario steps:
Scenario: Validate page title
Given driver 'https://google.com'
And driver.maximize()
Then match driver.title == 'Google'
When I run it, I get the following error:
assertion failed: path: $.title, actual: 'Google', expected: ''Google'', reason: actual value is not JSON-like abc.feature:16 - path: $.title, actual: 'Google', expected: ''Google'', reason: actual value is not JSON-like
And If I use:
Then match driver.title == Google
I get below error:
javascript evaluation failed: driver.title, null
Additional details:
karate-junit4 = 9.4.0
* configure driver = { type: 'chrome', showDriverLog: false }
As suggested in the comments, used 0.9.5.RC3 as well.
Received this error:
assertion failed: path: $, actual: '', expected: 'Google', reason: not equal
Can anyone point out If I am missing anything here?
Last Update: This issue was a bug with 0.9.4. Please see detail description from the below link: Issue link: https://github.com/intuit/karate/issues/913