SeleniumHQ / selenium-ide

Open Source record and playback test automation for the web.
https://selenium.dev/selenium-ide/
Apache License 2.0
2.72k stars 739 forks source link

Unknown command storeXpathCount #1821

Open larstippmann opened 1 month ago

larstippmann commented 1 month ago

🐛 Bug Report

I would like to refer to this closed ticket https://github.com/SeleniumHQ/selenium-ide/issues/1585#issue-1537042005

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 commented 1 month ago

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

toddtarsi commented 1 month ago

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 commented 1 month ago

Ok . got it. I will use the migration tool. Thanks for your help.

Von: Todd Tarsi @.> Gesendet: Montag, 6. Mai 2024 13:21 An: SeleniumHQ/selenium-ide @.> Cc: larstippmann @.>; Author @.> Betreff: Re: [SeleniumHQ/selenium-ide] Unknown command storeXpathCount (Issue #1821)

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.

- Reply to this email directly, https://github.com/SeleniumHQ/selenium-ide/issues/1821#issuecomment-2095782 618 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/ACY72NP2E2VLBBN3A5G2SIDZA 5RQ7AVCNFSM6AAAAABHIS55TCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJVG44DE NRRHA unsubscribe. You are receiving this because you authored the thread. https://github.com/notifications/beacon/ACY72NO74ZFK4AUDGPFXHEDZA5RQ7A5CNFS M6AAAAABHIS55TCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTT 45MNNU.gif Message ID: < @.> @.>