Salesforce custom lightning components not visible to testcafe
See original GitHub issueWhat is your Test Scenario?
Login to Salesforce and interact with any custom lightning component.
What is the Current behavior?
No custom lightning components appear to be visible to testcafe
What is the Expected behavior?
testcafe should be able to interact with custom lightning components just like a user in browser
What is your web application and your TestCafe test code?
Salesforce
Your website URL (or attach your complete example):
Your complete test code (or attach your test files):
import { Selector } from 'testcafe';
fixture`Custom Lightning Component issue`// declare the fixture
.page`https://brave-bear-e42cd9-dev-ed.my.salesforce.com/`; // specify the start page
test('Lightning Component', async t => {
await t
.typeText('#username','watkinssf@brave-bear-e42cd9.com')
.typeText('#password','Password1234')
.click('#Login')
.click('.slds-icon-waffle')
.click(Selector('ul li a span .label.slds-truncate.slds-text-link').withText('Accounts'))
.click(Selector('.slds-truncate.outputLookupLink.slds-truncate.forceOutputLookup').withText('United Oil & Gas Corp.'))
.expect(Selector('div.slds-card__body div').innerText).contains('Hello I\'m a custom lightning component')
});
</details>
<details>
<summary>
✖ Lightning Component
1) Cannot obtain information about the node because the specified selector does not match any node in the DOM tree.
> | Selector('div.slds-card__body div')
Browser: Chrome 73.0.3683 / Mac OS X 10.14.4
9 | .typeText('#password','Password1234')
10 | .click('#Login')
11 | .click('.slds-icon-waffle')
12 | .click(Selector('ul li a span .label.slds-truncate.slds-text-link').withText('Accounts'))
13 | .click(Selector('.slds-truncate.outputLookupLink.slds-truncate.forceOutputLookup').withText('United Oil & Gas Corp.'))
> 14 | .expect(Selector('div.slds-card__body div').innerText).contains('Hello I\'m a custom lightning component')
15 | .debug()
16 |});
at Object.<anonymous> (/Users/brian.okeefe/Projects/DevExpress-TestCafe/e2e/tests/lightning_comp_test.ts:14:64)
at <anonymous> (/Users/brian.okeefe/Projects/DevExpress-TestCafe/e2e/tests/lightning_comp_test.ts:7:71)
at __awaiter (/Users/brian.okeefe/Projects/DevExpress-TestCafe/e2e/tests/lightning_comp_test.ts:3:12)
at test (/Users/brian.okeefe/Projects/DevExpress-TestCafe/e2e/tests/lightning_comp_test.ts:6:39)
at markeredfn (/usr/local/lib/node_modules/testcafe/src/api/wrap-test-function.js:17:28)
at <anonymous> (/usr/local/lib/node_modules/testcafe/src/api/wrap-test-function.js:7:5)
at fn (/usr/local/lib/node_modules/testcafe/src/test-run/index.js:242:19)
at TestRun._executeTestFn (/usr/local/lib/node_modules/testcafe/src/test-run/index.js:238:38)
at _executeTestFn (/usr/local/lib/node_modules/testcafe/src/test-run/index.js:291:24)
1/1 failed (30s)
Screenshots:
attached
Steps to Reproduce:
- Go to the salesforce scratch org https://brave-bear-e42cd9-dev-ed.my.salesforce.com
- log in with credentials in test
- Navigate to Accounts
- Assert on custom lightning component with text “Hello I’m a custom lightning component”
Your Environment details:
- testcafe version: 1.1.3
- node.js version: v11.14.0
- command-line arguments: testcafe chrome e2e/tests/lightning_comp_test.ts
- browser name and version: Chrome 73.0.3683
- platform and version: Mac OS X 10.14.4
- other: have tried across multiple browsers and multiple versions of testcafe. bumping up to hammerhead v 14.6.0 resolved another issue for us where the navigation bar was not appearing in testcafe.
Noticed the issue in our production like QA environment.
Custom Lightning Component for this example was created through this trailhead https://trailhead.salesforce.com/en/content/learn/projects/quickstart-lightning-components/quickstart-lightning-components3
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
custom lightning component is not visible in salesforce ...
I created custom lightning web component and want to show this in my salesforce community. i added lightning Community__Page in targets but ...
Read more >Custom Lightning Component does not appear in Community ...
The Custom Component will not be visible on the Community unless you add the below tag to the component. <aura:component ...
Read more >TestCafe v1.7.0 Released | Framework | Release Notes
TestCafe now allows you to obtain information about the current user agent. These data identify the operating system, platform type, browser, engine, etc....
Read more >An in-range update of testcafe is breaking the build #94 - GitHub
The devDependency testcafe was updated from 1.3.3 to 1.4.0. View failing branch. This version is covered by your current version range and after...
Read more >Newest 'testcafe' Questions - Stack Overflow
I am trying to open the Salesforce home page through UI automation (Testcafe), the Salesforce loading symbol is present for long time. It...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@blokeefe
Thank you.
I’ve reproduced the issue under Window 10 / Chrome 73 / testcafe-hammerhead@14.6.2 (DevExpress/testcafe-hammerhead@05d2788). We need some time to investigate this issue using your credentials.
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.