selenium-ide icon indicating copy to clipboard operation
selenium-ide copied to clipboard

How to save substrings for further validation?

Open cinnest opened this issue 8 years ago • 2 comments

After creating a new code a message is shown like: "transaction code: 1234". This code is then shown in a table with a list of transactions. For validating it on this table I'd like storing just the substring "1234". I've tried the following but I always get a message the storedVars is not defined. How it should be done using the new selenium-IDE (3.1.0)?

{
"id": "b64d23c7-72af-48f2-957a-3929281cb2ec",
"comment": "",
"command": "storeText",
"target": "css=span.ui-messages-summary.ng-star-inserted",
"value": "trxCodeMsg"
}, {
"id": "0365bcc1-d263-4417-829d-da68debd2c20",
"comment": "",
"command": "executeScript",
"target": "return storedVars['trxCodeMsg'].substring(18,22)",
"value": "trxCode"
}

cinnest avatar Jul 31 '18 16:07 cinnest

Please open an issue

Cheers, Tomer On 31 Jul 2018, 19:35 +0300, cinnest [email protected], wrote:

After creating a new code a message is shown like: "transaction code: 1234". This code is then shown in a table with a list of transactions. For validating it on this table I'd like storing just the substring "1234". Is possible doing that with the "execute script"? How? I've tried the following but I always get a message the storedVars is not defined: { "id": "b64d23c7-72af-48f2-957a-3929281cb2ec", "comment": "", "command": "storeText", "target": "css=span.ui-messages-summary.ng-star-inserted", "value": "trxCodeMsg" }, { "id": "0365bcc1-d263-4417-829d-da68debd2c20", "comment": "", "command": "executeScript", "target": "return storedVars['trxCodeMsg'].substring(18,22)", "value": "trxCode" } — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

corevo avatar Aug 01 '18 08:08 corevo

Issue #321 Thanks

cinnest avatar Aug 01 '18 08:08 cinnest