GithubHelp home page GithubHelp logo

seleniumhq / selenium-ide Goto Github PK

View Code? Open in Web Editor NEW
2.7K 160.0 725.0 32.29 MB

Open Source record and playback test automation for the web.

Home Page: https://selenium.dev/selenium-ide/

License: Apache License 2.0

JavaScript 15.20% HTML 2.53% CSS 0.41% TypeScript 80.87% Starlark 0.37% Python 0.07% Elixir 0.55%
selenium-ide webextension electron playback record selenium webdriver

selenium-ide's Introduction

Selenium IDE

logo

An integrated development environment for Selenium scripts Selenium IDE as an electron application written to enable recording and playback of selenium scripts.

Installation

Installation can be performed in a variety of ways:

  1. Prepackaged binaries are available to be installed directly as github releases.
  2. Selenium-ide can be installed via npm npm install -g selenium-ide and run via selenium-ide directly.
  3. The application can be built manually using the below instructions.

Building Manually

To build manually, you must have the below prerequisites installed and follow the steps afterward.

Prerequisites

Building

  1. git clone https://github.com/SeleniumHQ/selenium-ide - Clone the IDE repo
  2. cd selenium-ide - Navigate into the IDE folder
  3. pnpm -r i - Install dependencies
  4. pnpm run build - Build the app
  5. pnpm run start - Run the app

What now?

Here's a draft of the general tasks ahead. Feel free to pitch in and announce which you wish to take upon yourself:

  • Selectors accuracy - an option is ranking selectors - we can optimize selectors correctness and test stability by collecting as many attributes as we can per user event. The most likely properties will be used for the selectors, with fallback to the others.
  • Intelligent editing
  • Export to selenium code in different languages

Contributing

If you'd like to contribute to the codebase, start by building manually using the above commands. The below tips are meant to assist you as well.

  • If you'd like to iterate more quickly, yarn watch will facilitate near-realtime rebuilding for rapid iteration (make change -> yarn start -> test change)
  • To activate the devtools on an page, CommandOrControl+F12 or CommandOrControl+Option+I will open the devtools. For your convenience, the React Developer Tools are pre-installed in the electron environment.
  • VSCode has a defined workspace structure and run command, as well as file mappings to allow for breakpoints to work across sourcemaps for the main process.
  • The chrome dev tools are available at localhost:8315 to use if the inline devtools are not enough, although I'd highly advocate for the in window dev tools, since they have the React Developer Tools installed as well.

Questions or want to chat?

If you have questions, check out our FAQ.

You can also find us on the #selenium IRC channel, which is also available on Slack.

Architecture

The codebase is javascript, and relies heavily on the NodeJS, Electron, and React ecosystem. This is a collection of packages arranged in a monorepo config. Excepting the code-export packages, which are fully untyped, these packages are fully typed using Typescript.

Packages

These are the main packages. They're used to run the thing:

  • selenium-ide: Main Electron app. Built with webpack, react frontend. Communicates via the IPC protocols.

  • side-runner: NodeJS Task Runner. Built with typescript.

  • side-cli: Experimental cli using react and ink.

  • side-runtime: Playback system wrapper. Takes side files and executes them. Used by both selenium-ide and side-runner.

  • side-api: This is the api shape of selenium-ide. This is intended to be used to help share the api types with plugins in a lower footprint way.

  • side-model: This is used to provide metadata around the standard commands and argument types.

  • side-commons: This is like the typical utils/helpers folder, except meant to be shared across packages instead of just folders.

  • side-code-export: NodeJS transpiler for .side files. Used to export to other languages (csharp, java, javascript, python, ruby).

  • code-export-*: Code export format for various languages

selenium-ide's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

selenium-ide's Issues

loading old Suits in Selenium IDE

Hey guys,
maybe I am too stupid, but I am not able to load my old selenium testsuits? Adding old cases works fine ..
cheers
thanks for your great work

UMD Conversion Status

Core files to be converted to UMD

  • src/atoms.js
  • src/background.js
  • src/commands-api.js
  • src/editor.js
  • src/ext-command.js
  • src/formatCommand.js
  • src/initial.js
  • src/locatorBuilders.js
  • src/playback-api.js
  • src/prompt-injector.js
  • src/prompt.js
  • src/record-api.js
  • src/record.js
  • src/selenium-api.js
  • src/selenium-browserbot.js
  • src/targetSelector.js
  • src/escape.js

The following are not planned to be converted

  • src/utils.js
  • src/IO/load_file.js
  • src/IO/save_file.js
  • src/panel/js/colResizable-1.5.min.js
  • src/panel/js/command_grid.js
  • src/panel/js/command_grid_toolbar.js
  • src/panel/js/context_menu.js
  • src/panel/js/hideshow.js
  • src/panel/js/jquery-3.2.1.min.js
  • src/panel/js/jquery-ui.min.js
  • src/panel/js/jquery.equalHeight.js
  • src/panel/js/jquery.tablesorter.min.js
  • src/panel/js/jquery.tabletab.js
  • src/panel/js/log.js
  • src/panel/js/panelSetting.js
  • src/panel/js/sortable-ui.js
  • src/panel/js/testcase_grid.js

Current test focus does not switch to newly loaded .side file

When loading .side file to newly launched empty Selenium IDE, the newly loaded test case is not selected on IDE, and no commands are displayed on the test step area.
Although the test steps are displayed when I click the test case name, it apparently looks like no test step is loaded.

I introduced new Selenium IDE to my customers today, and many of them complained me that they could not load the .side file.
I appreciate if this UX will be improved.

Selenium IDE version: 1.0.1
OS: mac
Browser: Chrome

[Image of not focused test]
testcaseisnotfocused

[Question] Hidden inputfields / dropzone?

Hallo All,

This is not really related to a bug! I'm trying to find a clear awnser for my problem. Is it possible to somehow target hidden inputfield or the dropzone to upload a file only using the Selenium IDE.

Example: http://www.dropzonejs.com/examples/simple.html

When i try to target the hidden input field:
[error] Element is not currently interactable and may not be manipulated

Tried to find some awnsers on the internet and there is not directly a clear awnser to this problem or a way to manipulate that allows us to upload some files. Any ideas?

Any plans for Selenium Builder JSON (Selenium2 vs Selenium1 html) support?

Selenium Builder gave us functionality like the original Selenium IDE but created a new json format called "Selenium2" as opposed to the html "Selenium1".

Now it appears that the Se Builder project has stopped being developed, especially as FF57 will cause the extension to no longer work without a rehaul. Github comment

However, those of us that used it for a time have lots of these json scripts. It would not only be helpful in being able to import these json scripts into the new IDE, but I think this json-based format is more portable as well.

Another thing that Se Builder did well is offer an "interpreter" for running these scripts against remote servers like SauceOnDemand. This is a huge bonus compared to being limited to running these scripts back in Selenium IDE, or having to generate language-binding specific code.

Forward thinking ...

Conflict with client require.js

Breaks everything if require.js used on site.

e.g. check http://www.bbc.com with ide enabled

Uncaught Error: Mismatched anonymous define() module: function () { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ }.....

Core extension

How do I add the core extension? It used to be possible to add core extension and user extension in the previous versions.

Thanks

[Variables] Selenium IDE

In the old situation/test cases from the old IDE we used one test case that we always put as a start of our test suite and those variables could be used by all the following test cases inline. I'm not sure if you were able to run multiple suites at once.

But my ideal solution the variables are usable and stored/available for all test suites and cases.

Support SideeX test suites/cases

Since the old Selenium IDE stopped working, I have started writing test cases using SideeX, from which this project started. I am thinking of migrating to this official IDE, but I can't open the test suites and cases that I have recorded using SideeX. Is this is a bug or will this be supported in the future?

Thanks for the hard work by the way.

Extension Logging

Do we need to log anything?
Should we monkey patch console.log isProduction ? console.log : new Function()?

This can't stay

v0.1 and v0.2

All versions seems to have files/folders that are missing is there somewhere already a working version te be found for testing?

.side-format specification

Is there any (final) specification of the .side-format available yet? I would like to write a small interpreter for the .side files.

Please support Page Objects, Flow Control, Keywords, Multi Search and Replace, Resouce folders, and a CSS/Xpath creator.

Please support Page Objects, Flow Control, Keywords, Multi Search and Replace, Resouce folders, and a CSS/Xpath creator.

I'm not pretending to be creative with my suggestions as they already exist in other frameworks and software. But they are scattered across different pieces of software or in compiled languages like Java or Python and are difficult/impossible to step thru 1 line at a time. Also, many don't record and playback (like RIDE) which gets you started from 0 to Hero so quickly in a rapidly changing agile environment.

I've tried most of the popular frameworks and feel the IDE is still the best. I love the IDE much more than any compiled language framework largely because of the ability to test my tests (Who knew a tester would want to test their tests?... :P). The ability to step thru the script 1 line at a time and execute a single line without going thru the entire sequence is a Godsend. It's nearly impossible to test for false passes in compiled language frameworks like TestNG/Java or RobotFramework/Python as I can not create an intentional fail condition because the script needs to run from beginning to end/breakpoint. Because I am unable to test for false passes efficiently, I have very little confidence in the results even when the lights turn green.

The IDE lacks the ability to support Page Objects. It would be great to be able to organize drag and drop Page Objects. Much like Katalon Studio. During record and playback, objects are recorded in a page object. This would make organizing page objects much more convenient and would bring the IDE in line with the more common layered design. We can have toggle switch that records using page objects or inline in case a user would benefit more from the original inline approach.

I've able to create the equivalents of classes and instances using Flow Control and that has been a life saver. I've been able to create scripts to detect login conditions, wait for emails to arrive before continuing, and create image diffs. The ability to use Flow Control has been absolutely vital to my tests. Please make sure Flow Control is in the feature set.

A super long wall of script in IDE makes it very difficult to discern the test intent. Therefore, I comment before each sequence with a test intent statement. RobotFramework does a decent job of making the test intent understandable by allowing a coder to create a keyword in a human readable sentence so a tester or a business user can understand the intent of the test. For this, we should either support keywords (so that it can be reusable across tests), or support collapsing script sequences under comments to clean up the view like a caret that collapses a sequence under a comment.

Sometimes, we don't do a good job of creating best Page Objects but we still need to maintain our tests. So being able to Multi Search and Replace xpaths and css identifiers would be amazing. I currently use an IDE (TextWrangler) to multi search and replace instances of the same css or xpath when that changes. It's a good tool to have and something we all use when the identifier of a field or button changes.

It is common to need to upload something like an image, video, or some other file. Having a resource folder on hand with a universal file path to store test assets should be a norm such that it works with Git. Having assets stored on my MacBook's desktop currently does not work with any user when they Git Pull since the path includes my name. Having a generic resource folder in the IDE would solve this.

Currently, I rely on FireBug and FirePath to find css selectors and xpaths. It would make sense if such a feature exists on the Selenium IDE itself such that creating xpaths and css selectors does not require a 3rd party app.

Thanks for reading all the way down to here. We love you guys for all your hard work and rely on it every day. Our devs seem to cause regressions for fun and if it wasn't for IDE, we would be hopeless to find any of them at a reasonable time frame. IDE is by far the best. Even when people boast about their frameworks, and we've built them, we simply don't trust their results as much as the IDE. The IDE's line by line execution simply outclasses any compiled language test framework as we can prove each line of code.

Thank you and we look forward to using the new Selenium IDE.

Test Suites will not run all test cases

Test suites will only play the first test case. If I click the pause button and click again, it will play the next test case. Normally in Test suite, should'nt it play all test cases in the Suite?

Improvement Request: Ask test name when saving

2018-01-19 16 12 32

Saving script at the first time, there is nothing to show in left side "Tests" bar. After saving the script and opening the project, there is "untitled" test in Tests bar. I think it is good for users to ask the test title when user saves script at the first time.

Thank you for creating great tool :)

loading old test cases in Selenium IDE

hello,

for me it is not possible to load old test cases into the new IDE.
(Windows 7, latest Chrome Version, Selenium IDE 1.0.1)

Test Case
Test Case Test.txt

We use very often .txt or .html for the Test Cases, but we can't load them in the new IDE.
Is there a solution?
The log is empty.

We have a lot of "old" test cases and we are still using the an old firefox to run these internal tests.

Improve background extension behavior

  • be passive when the extension window is not active
  • explain that the tab has to be reloaded in order to create connection between the extension and the tab

Improvement: option to disable notifications

On v1.0.1, I felt a bit annoying that browser notifications are displayed when each step is saved. It's fantastic if there is an option to disable them.

Thanks for a wonderful extension!

CLI executing

Are there any plans for executing on Command Line Interface with Selenium IDE TNG?
I think we already have some plans like below:

  • plan 1: feature of exporting WebDriver code with some general languages.
  • plan 2: .side format test runner "selenium-side-runner.jar" like selenium-html-runner.jar
  • plan 3: something new and smart plan I don't know :)

Hi from the Kantu for Chrome / Selenium IDE "Light" team

I see that you are working on a new Selenium IDE -great.

We at a9t9 have started work on a browser automation extension a few months ago. This extension implements the Selenium IDE concept and the most common commands are supported already, with more to follow soon (for example variable support, assertions will be available with the next update).

Our extension borrows key concepts and commands from the original Firefox IDE and if we can return a few things now, even better.

If there are no direct follow up questions, you are welcome to close the ticket after reading. Just wanted to make sure you are aware of our work and the option to (re)use it :-)

Best,
Mathias

Running old test cases / commands (old, deprecated?)

Looks like with the new selenium IDE there are less or limited commands you can use/select.

Example: Failed: Unknown command: waitForElementPresent

Are those commands on purpose gone? would be nice to have a suggestion to what to use instead in the log if commands needs to be replaced with something else?

And have more of those problems with type or send keys on input fields that are failing for some reason... But will soon comeback to update the ticket.

Another issue i'm facing right now is the following:

Blocked a frame with origin "URL" from accessing a cross-origin frame.

Im fairly new to IDE and just starting with automation testing! :D

ANAWAY im really happy with the work you guys have done so far! ๐Ÿ‘

Firefox 57+ Support

Since Firefox has changed their extension model, can you guys update this to work in the the newer versions of Firefox Developer Edition 57+?

Recording should be stopped when Play button is pressed

If you accidentally leave recording on when you press the play button, the IDE will start recording these commands that are being played back. I've actually seen the recorder get itself stuck in a loop doing this.

I think it would make sense if the recorder just stopped automatically when play is hit to avoid this problem.

Can't click browser after run test selenium-ide

I pulled lastest code from master repository.
There is something two strange situation.

  1. after running test case, scroll is appeared at right bottom
    image

  2. I can't click 'selenium-highlight' section on browser.
    image

I have used chrome.

Relationship to SideEx?

Hello, and firstly thank you for your time in making this.

I have a couple of questions on how this project relates to SideEx:

  1. The readme acknowledges that SideEx has been used as a starting point. Is that link going to continue (i.e. this project will draw updates from SideEx, e.g. in the way that say Ubuntu draws from Debian)? Or will the two projects diverge?

  2. How do the two projects differ? They look quite similar today, so perhaps a better question is how do their goals and roadmaps differ?

NB: I've posted this as an issue, as I think it'd be helpful to update the readme to include this material.

All the best,

  • Daniel

make use of selenium atoms

The modules in the selenium main tree (under JS) are google closure modules.
Eventually the IDE will be merged to there and it'll make the landing less bumpy if we use the atoms (javascript/atoms) and perhaps some of the other pieces too.
https://github.com/SeleniumHQ/selenium/tree/master/javascript/atoms
The atoms provide building blocks for basically every bit of webdriver functionality
Need click? bot.action.click
webdriver.atoms.element will be a useful module

SideEx team contribution: license, notice and credit

We should properly credit the SideEx team for their contribution and also edit the NOTICE file accordingly - as customary under Apache.
quoting:
"The SideeX repo looks clean and correctly licensed under the Apache License 2.0. As long as you follow the same conventions re: attribution and notice requirements as you would with any other Apache-licensed code, you should be fine. The SideeX contributors will retain ownership of the copyrights in their code; Selenium IDE contributors will retain ownership of the copyrights associated with any modifications they make to the SideeX code. And, of course, Selenium shouldn't call the forked version of SideeX "SideeX."

While Selenium would be required to retain in the forked code all existing attributions to the SideeX contributors (as per the terms of the Apache license), you're not necessarily required to acknowledge SideeX on your website and/or blog. But, seeing as: a) the SideeX project acknowledges Se IDE on the front page of their site, and b) Doron has already reached out to the SideeX team lead, giving SideeX a shout out is probably the community-friendly thing to do. "

Store JS?

Trying to figure out why or why this isn't working anymore. Is this something that is not possible anymore?

Store | javascript{(new Date().getDate()+"/"+(new Date().getMonth()+1)+"/"+new Date().getFullYear())} | testDate

For getting the Time and Date for example.

can't start tests when browser opens special page(ex: Google Chrome's start page, Chrome web store, about:blank)

on v1.0.1 .
as general case, many users will open .side file and immediately run it on browser's start page.
but Google Chrome's start page can't be run Selenium IDE testcase because of Chrome's start page can't be injected any Selenium IDE resources(like JS, CSS).
so many users will face to simple execution timeout issue, but they can't resolve that.

one idea: before run Selenium IDE testcase, redirect to some general web page that can be injected Selenium IDE resources.
Selenium Builder implements similar features.

Failed assertion commands do not abort the test case

The active test case does not terminate when an "assert" command fails. Instead, a failure message is displayed and the remaining commands in the test case are still executed. To my understanding, this is how "verify" commands should work, but it's not appropriate for assertions.

The old Selenium IDE 2.9.1 plugin behaves as expected.

Selenium IDE Log (v1.1.0) demonstrating this issue:

Running 'assertion_test'
1.Trying to execute assertText on name=btnK with value doesnotexist... Failed:
Actual value '' did not match 'doesnotexist'
2.Trying to execute open on /skipthiscommand... Success
'assertion_test' completed with 1 error(s)

'pending' className is remained after click the stop button.

Ordinary cases are normal.
But some cases were strange.
For example, we can execute command by double clicking command.
But if the command can't execute, the command keeps trying until success.
Then there is a test case.

  1. I executed a command that can't success.(I called this A command)
  2. I execute other command that can't success too.(I called this B command)
  3. Now we are waiting two commands. But These can't end.
  4. So I stop B command. Then remove the stop button.
  5. And I want to stop the A Command too. But There is not the button.

As far as I know, we can't execute multi command in current logic.
I hope to fixed it but I don't know your a road map yet whether You plan to possible to multi command or not.
I suggest some plans.

  1. When someone clicked stop button, test table UI was returned to initialize state.
  2. If isPlaying is true, can't execute new command.
  3. Stop other commands when new command is execute.

Other opinion or road map if you have, tell me please.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.