====== Record & Playback ====== The Record & Playback feature facilitates the process of mapping the steps of an existing UML diagram with the real steps of an application. It is a helper in the process of model and map, which you should use with the rest of TAST tools. Selenium IDE is an extension of Chrome or Firefox that allows you to record, edit and execute tests, also known as Selenium Recorder. ===== Installation ===== Install Selenium IDE from either the Chrome or Firefox web store. Selenium IDE records multiple locators for each element it interacts with. Through the use of the run command, you can re-use one test case insidie of another. Upon launching the IDE you will be presented with a welcome dialog. This will give you quick access to the following options: {{ :en:selenium1.jpg?direct&600 |}} * Record a new test in a new project. * Open an existing project. * Create a new project. * Close the IDE. If this is your first time using the IDE (or you are starting a new project), then select the first option. After completing these settings, a new browser window will open\\ \\ {{ :en:selenium2.jpg?direct&400 |}}\\ load the base URL\\ \\ {{ :en:selenium3.jpg?direct&400 |}} and start recording\\ \\ {{ :en:selenium4.jpg?direct&400 |}}. ===== Saving your work ===== To save everything you've just done in the IDE, click the save icon in the top-right corner of the IDE.\\ \\ {{ :en:selenium5.jpg?direct&500 |}}\\ \\ It will prompt you to for a location and name of where to save the project. The end result is a single file with a .side extension.\\ \\ {{ :en:selenium6.jpg?direct&500 |}}\\ \\ You can import Selenium IDE record saved file to in the Tast Web.\\ \\ On the first Selenium Record version you can only import created steps to the previously. Created diagram must contains two adapters Objects User and GUI adaptor. Every new command imported from selenium Record file will be converted to the Tast function and creates and insert message after last diagram message if it proceeds. The import button for Selenium Record functionality you can find it in the Tast Web top right corner. For the start import you have to select generated record.side file, Domain, Project, Folder and Diagram.\\ \\ The next Selenium Record version will permit import generated record.side file without previously created user diagram for the first time. https://www.seleniumhq.org/selenium-ide/docs/en/introduction/getting-started/ {{:en:input.png?nolink|}} ===== Instructions for Using Selenium IDE in TAST ===== ====In Selenium IDE==== * Download Selenium IDE app form this link (you should use Chrome):\\ Https://chrome.google.com/webstore/detail/selenium-ide/mooikfkahbdckldjjndioackbalphokd/related\\ \\ * Install the Selenium IDE extension in Chrome.\\ \\ {{:en:10-pressinextensionseleniumide.jpg?nolink|}}\\ \\ * Open Selenium IDE, to create a TS:\\ \\ {{:en:11-chooseaseleniumproject.jpg?nolink|}}\\ \\ * Set the url of the initial page you want to start recording and press the REC button to start recording.\\ \\ {{:en:12-seleniumrecording.jpg?nolink|}}\\ \\ {{:en:11b-startrecordingaseleniumproject.jpg?nolink|}}\\ \\ * Start the navigation. You can Pause and Stop at anytime. Your navigation is recording in the IDE while you are browsing the pages and options.\\ \\ {{:en:13-navigationpausesandstops.jpg?nolink|}}\\ \\ * Stop and Save the TS:\\ \\ {{:en:14-stopandsave.jpg?nolink|}}\\ \\ ====In TAST==== * Go to your browser and click on recording button to start the record of the navigation of your diagram (as described in the section: In Selenium IDE). * Once you have recorded your navigation, you are ready to import the recorded navigation in TAST. Go to TAST and in Modeling and select the button to import the Selenium IDE navigation.\\ 1. Click in the button to import the file with the recorded code from SeleniumIDE.\\ 2. Select the file with your navigation recorded and drag and drop.\\ 3. Accept to create the diagram.\\ \\ {{:en:record_playback_example1.png?800|}}\\ \\ * It appears an advice in orange color, informing that the diagram has imported, and it's necessary to save it. The records in Selenium has imported in TAST. Thus, you can save the diagram.\\ \\ {{:en:record_playback_example2.png?800|}}\\ \\ * Now, you can launch the diagram following the normal procedure. * Additionally, please consider the following behavior of the application: * If the diagram does not exist, a new one is created. * If the User or GUI object does not exist, a new one is created. When a new GUI object is created, it is created with the Selenium IDE URL and with the Microsoft Edge browser by default. * In case of already existing adapter GUI created in the diagram, no other is created and the URL of this is not updated. Selenium IDE commands are simply mapped to this. * The messages are mapped to the first GUI HTML adaptor found. If none exists, it is created as the last object in the diagram. * The messages are added after the existing messages. * It is compatible with already created diagrams that have different objects and messages.\\ \\ **IMPORTANT**: If the same messages are imported again, they will be added after the existing ones in the diagram.