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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store & echo functions - not working cross scripts or on single Execute #37

Closed
cwpm opened this issue Mar 6, 2018 · 3 comments
Closed

Comments

@cwpm
Copy link

cwpm commented Mar 6, 2018

On the old Selenium IDE, I set up Suite that had multiple Cases for each website. What I was trying to achieve was to have 1 x Script that was a Config file that stored (using "Store") a Website specific details e.g. user, password, email, sandbox details. And many more.

store - http://www.msn.co.uk - website
store - test@test.com - email
store - passwordtest - password

And the next Case script in the Suite, it would run and USE that Stored Data (e.g. website, email, password), this would mean that I could have 1 script for testing e.g. 'Adding Products to basket' for which ran off the Stored data in the Config script. This allows me to use the 1 script across multiple Websites without having to copy\create\manage as individual. I'd have 1 that would work across all.

Open - ${website}

So at Checkout it would use the following:
id=email - ${email}
id=password - ${password}


The Issues I had
With Kantu I've come across a few road blocks which prevented me from using my old Selenium IDE scripts and would cause a lot of issues and extra management:

  1. It doesn't allow the data Stored in one Macro to be used in another Macro, e.g. the Config file macro (1), and the 'Add to Basket' macro (2). The temporary data doesn't remain and isn't used across other macros.
    On the original Seleniu IDE, it only temporarilly stored as long as the extension (Selenium IDE) was open, when closed all stored data was lost.

  2. In the same Macro, the data isn't Stored after a test completes it's run.
    Using an example:

If you run Store then Echo on the same script it works fine. BUT whilst on the same script, if you set the 'Echo' command to 'Execute' it shows as "[error] variable "EMAIL" is not defined".

Here's the JSON code:
{ "CreationDate": "2018-3-6", "Commands": [ { "Command": "store", "Target": "test@test.com", "Value": "email" }, { "Command": "echo", "Target": "${email}", "Value": "" }, { "Command": "store", "Target": "234wefwef", "Value": "pass" }, { "Command": "echo", "Target": "${pass}", "Value": "" } ] }

And I've attached the screenshot of Executing STORE first manually, then ECO second manually.
kantu issue - echo

Can I ask that the Store commands store the Data in the same Macro, and can be used in other macros for Kantu. It's a key part to all of my scripts as it reduces management and replication, it also mitigates the tedious task of updating them all by making it only ONE that needs updating for all site.

Let me know if you need any further information. If it's not possible, it'd be a deal breaker :(

@A9T9
Copy link
Owner

A9T9 commented Mar 6, 2018

Note that there is another elegant solution for reading configuration data: You can read data from a CSV file with csvSave.

But I understand that this is not the same as having global vars, so I added support for global vars to our todo list. Thanks for the suggestion!

@cwpm
Copy link
Author

cwpm commented Mar 7, 2018

Thank you for the feedback, and putting it on the todo list.
I appreciate the effort and you guys are doing great, your extension is miles ahead of any other Selenium developments that I've seen.

@A9T9
Copy link
Owner

A9T9 commented Apr 13, 2018

Gobal variables are now available!

@A9T9 A9T9 closed this as completed Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants