Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown command storeXpathCount #1821

Open
larstippmann opened this issue May 6, 2024 · 3 comments
Open

Unknown command storeXpathCount #1821

larstippmann opened this issue May 6, 2024 · 3 comments

Comments

@larstippmann
Copy link

larstippmann commented May 6, 2024

馃悰 Bug Report

I would like to refer to this closed ticket
#1585 (comment)

The proposed solution is imho not the right one. Selenium uses the storeXpathCount in the IDE and writes it in the side file. The side runner needs to support this command in order to be able to run a side file which is using this command.

It would be helpful if the storeXPathCount command can be implemented besides the doStoreElementCount command

@seleniumhq/side-runtime/dist/webdriver.js
Line 583
async doStoreXpathCount(locator, variable) {
const elements = await this.driver.findElements(parseLocator(locator));
this.variables.set(variable, elements.length);
}

@seleniumhq/side-runtime/dist/Commands.js
Line 418
storeXpathCount: {
name: 'store xpath count',
description: Gets the number of nodes that match the specified locator (e.g. "xpath=//table" would give the number of tables).,
target: ArgTypes_1.default.locator,
value: ArgTypes_1.default.variableName,
},

@toddtarsi
Copy link
Contributor

Did you try migrating your project effortlessly using the side-migrate npm module?

@toddtarsi
Copy link
Contributor

This is a v3 command. It's not a good command because it only supports one selector. In v4, the major version change, we don't support that command anymore. If you want to support that, keep using v3 of the side runner.

@larstippmann
Copy link
Author

larstippmann commented May 11, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants