Closed pp0001 closed 1 day ago
Hi @pp0001,
thanks for reporting this issue! This is a bug. To give you more context:
The identification with the idSuffix
is working fine. We have a problem with our press function as the idSuffix
ist not passed here correctly.
@pp0001,
could you please test your issue again with wdi5 2.0.8?
Hi @Siolto ,
I tried to modify the version in the package.json, like "wdio-ui5-service": "^2.0.8"
Then repeat the following step, but the date cannot be selected.
await browser.asControl({
selector: {
id: "application-BusinessUser-recordAuditTime-component---workarea--calendar--Month1",
interaction: {
idSuffix: "20240508"
}
}}).press()
I have added a test for the fix and it is working fine on our site.
Can you please check that you really have the newest version installed?
Hello,
Thanks for you reply.
I tried to re-install the dependencies, and currently the version of "wdio-ui5-service" is "2.0.8".
And the UI5 version is "1.114.0".
And from the local file I found that the code of "press" function.
async press() {
// support fluent async api
let className;
let controlSelector;
let logging;
if (util.types.isProxy(this._domId)) {
const _controlInfo = await Promise.resolve(this._metadata);
className = _controlInfo.className;
controlSelector = await Promise.resolve(this._controlSelector);
logging = await Promise.resolve(this._logging);
}
else {
className = this.getControlInfo().className;
controlSelector = this._controlSelector;
logging = this._logging;
}
// when the interaction locator is existing we want to use the RecordReplay press (interactWithControl)
if (controlSelector.selector.interaction) {
if (logging) {
Logger.info(`using OPA5 Press action to interact with this ${className}...`);
}
const oOptions = {
selector: controlSelector.selector,
interactionType: "PRESS"
};
try {
await this._interactWithControl(oOptions);
}
catch (error) {
if (logging) {
Logger.error(`cannot issue OPA5-press() on control, because ${error.message}`);
}
}
}
else {
// interact via wdio
try {
await (await this._getWebElement()).click();
}
catch (error) {
if (logging) {
Logger.error(`cannot call press(), because ${error.message}`);
}
}
}
return this;
}
But the press date is still not working.
await browser.asControl({
forceSelect: true,
selector: {
id: "application-BusinessUser-recordAuditTime-component---workarea--calendar--Month1",
interaction: {
idSuffix: "20240509"
}
}}).press()
And following is my dependencies:
"dependencies": {
"@wdio/sauce-service": "^8",
"deepmerge": "^4.3.1",
"rimraf": "^5.0"
},
"devDependencies": {
"@wdio/allure-reporter": "^8.27.2",
"@ui5/cli": "^3",
"@wdio/cli": "^8.32.4",
"@wdio/cucumber-framework": "^8.32.4",
"@wdio/dot-reporter": "^8.27.0",
"@wdio/junit-reporter": "^8.27.0",
"@wdio/local-runner": "^8.32.4",
"@wdio/mocha-framework": "^8.27.0",
"@wdio/spec-reporter": "^8.32.4",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"wdio-timeline-reporter": "^5.1.4",
"wdio-ui5-service": "latest",
"wdio-vscode-service": "^6.0.3",
"dayjs": "^1.11.10"
}
Are there any other suggestions? Thanks in advance.
Thanks, Pamela
Hello @Siolto ,
Currently the version of "wdio-ui5-service" is "2.0.8" installed in my local environment. I think this is the latest version.
And then when I execute the following code, the date can be focused, but not selected.
The UI5 version is "1.114.0".
And I'm using this framework "@wdio/cucumber-framework": "^8.32.4"
to execute test.
Are there any other things I need to update?
const sMonth1 = await browser.asControl({
forceSelect: true,
selector: {
id: "application-BusinessUser-recordAuditTime-component---workarea--calendar--Month1",
interaction: {
idSuffix: "20240509"
}
}})
await sMonth1.press()
Thanks, Pamela
hey 👋 - silence for 30 days 🤐 ... anybody? 😀
closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠
Describe the bug
I tried to select a date range in "sap.ui.unified.Calendar" But through following code cannot click/select the date correctly.
Screenshots if applicable, add screenshots to help explain your problem.![image](https://github.com/ui5-community/wdi5/assets/21302396/a1738146-7c3b-4e1c-bd73-ecb81dda614a)
Runtime Env (please complete the following information):
wdi5/wdio-ui5-service
-version: ^2.0.6UI5
version: 1.114.0node
-version (output ofnode --version
): v20.11.0Additional context Add any other context about the problem here, e.g. any options the target browser is started with like
--headless
or if the tests run in a CI environment