Comments (6)
Thanks, @olivier-martin-sf. This issue is resolved now!
I will continue testing and will let know if any issues.
Thanks again
from utam-js-recipes.
Thank you for taking the time to report this issue. Looking at the information you provided, I have a couple of questions:
- Did you replace the values in the
.env
file with the values for your environment? - Were you able to build the page objects? (
yarn build
at the root of the workspace) - What gives
cat utam-preview/pageObjects/Login.js
Your issue happens in the beforeAll
hook in the test when we try to login against the environment. We try to load the Login
page object during that hook and it seems that's where the issue is coming from:
export async function login(testEnvironment, landingPagePartialUrl) {
const { baseUrl, username, password } = testEnvironment;
console.log(`Navigate to login URL: ${baseUrl}`);
await browser.url(baseUrl);
const login = await utam.load(Login); // it seems like the problem you are having happens here
await login.loginToHomePage(username, password, landingPagePartialUrl);
}
Hopefully that makes sense, looking forward to hear back from you
from utam-js-recipes.
Thanks, Martin
listing steps below and I am happy to join conf. call on zoom or webcall.
- I replaced .env file (with my login and credentials)
- renamed existing pageObject folder to pageObject2
- ran yarn build, this generated new pageObject folder (just to ensure I have the newly compiled files)
- Than ran only - yarn test --spec force-app/test/record-create.spec.js
- got an error with saying (Error: An element on the interface of UTAM Element or a Locator must be provided in order to load a PageObject)
I added try/catch and below is the modified code and error stack. and I also verified the code gets my credentials
added modified utilites/salesforce-test.js
try{
const login = await utam.load(Login);
console.log('after UTAM load');
await sleep(2000);
await login.login(username, password);
await sleep(2000);
}catch(e){
console.log('after UTAM load error');
console.log(e);
}
=== error stack
[0-0] Error: An element on the interface of UTAM Element or a Locator must be provided in order to load a PageObject
at UtamLoader.load (/Users/chandrasekar.pathipa/sf-unified/utam-js-recipes/node_modules/@utam/loader/build/index.js:42:19)
at login (/Users/chandrasekar.pathipa/sf-unified/utam-js-recipes/force-app/test/utilities/salesforce-test.js:23:34)
at UserContext. (/Users/chandrasekar.pathipa/sf-unified/utam-js-recipes/force-app/test/record-create.spec.js:67:9)
at UserContext.executeAsync (/Users/chandrasekar.pathipa/sf-unified/utam-js-recipes/node_modules/@wdio/utils/build/shim.js:101:16)
at UserContext.exports.testFrameworkFnWrapper (/Users/chandrasekar.pathipa/sf-unified/utam-js-recipes/node_modules/@wdio/utils/build/test-framework/testFnWrapper.js:25:18)
[0-0] 2022-02-07T19:14:40.981Z DEBUG @wdio/utils:shim: Finished to run "afterHook" hook in 0ms
from utam-js-recipes.
I just sent you an invite to join our external support channel (via email) where we'll be able to jump in a video call and troubleshoot this. This should speed up the process! Hope this works for you.
from utam-js-recipes.
After some analysis, the issue was caused by different versions of the UTAM dependencies being present in the workspace's packages:
[email protected]
in theutam-preview
package[email protected]
at the workspace root
After resetting versions of the dependencies to be in async (to 1.0.1) and running yarn clean && yarn build && yarn install
we were able to have the test running.
@cpathipati feel free to close the issue to confirm the problem has been solved!
from utam-js-recipes.
Thanks a lot, Olivier, @olivier-martin-sf
from utam-js-recipes.
Related Issues (20)
- Invalid options being passed to WDIO Jasmine adapter
- Set up linting for this project HOT 2
- [Bug] _utam_get_decorator locator not updated HOT 18
- [Bug] UTAM extension does not show Available Page Objects HOT 2
- [Bug] .clickHeaderSpecialLink() not finding tr th:nth-of-type(n) selector HOT 3
- [Bug] Incomplete jasmine stack-trace in case of utam method caused a test failure HOT 13
- How to load your custom RecordPage and expect its custom components? HOT 5
- [Bug] Issue building project HOT 9
- [Bug] Tests against Scratch Org only run successfully if the default user navigates to the UTAM Recipes app HOT 8
- [Feat Request] Introduce session check when running spec HOT 1
- [Bug] Can not get Field content in dynamic forms HOT 5
- Getting error on getRecordForm call HOT 4
- [Bug] - salesforce-pageobjects case sensitive error HOT 4
- Can't find element for Record Form HOT 11
- Getting error while loading RecordHomeFlexipage2 to update Record 'Error: Unable to find any valid implementation' HOT 4
- [Bug] - recordHomeFlexipage2 not implemented HOT 6
- [Bug] recordHomeFlexipage2 not visible in navexConsoleTabset HOT 3
- [Bug] getRelatedList() in path: {salesforce-feature-syntax\node_modules\salesforce-pageobjects\lists\pageObjects\relatedListSingleContainer.js} is not returning accurate result HOT 3
- [Bug] jasmine 3.6.3 is not compatible with Node 16 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from utam-js-recipes.