-
-
Notifications
You must be signed in to change notification settings - Fork 776
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
Status: exporting to Javascript code #131
Comments
Hi, thanks for the new post. How can we run the generated JS tests? This is the head of the generated file // This file was generated using Selenium IDE
const By = require('selenium-webdriver').By;
const until = require('selenium-webdriver').until;
jest.setTimeout(30000);
afterAll(() => {
Runner.cleaup();
});
const BASE_URL = 'http://localhost'; Do we need a library that combines jest and selenium? Runner and jest are not initialized |
Yes, have a look at the README |
Hi in the latest release you say that Javascript exporting is no longer needed, in fact, I don't find any button to export to Javascript. Is it possible to maintain this feature, I really need to see and modify those Javascript files. Thanks |
Hi, I have the same issue with exporting to Python. We take the initial IDE scripts, convert them to python and then adjust accordingly. Will that be a future enhancement? |
I am entirely confused of the answer to the error #211. Can any one explain it to me?. |
Yes, exporting in any language is now not allowed. You can only export in the crappy format Selenium team decided. So you can't modify anything |
Please be gentle and patient. This feature is going to be implemented sooner or later. If one wants it to progress faster one can give a hand of help, join the team or submit pull requests. |
I'll try to address some of the concerns. |
@Naramsim I think it should be possible to write a "side-to-HTML" converter... I'm going to start looking into this now, because I actually like the User Experience of the Selenium IDE 3.x beta better than the old Selenium IDE 2.x, the export feature is the last piece of the puzzle for my team to adopt it. I'm not a ReactJS/WebExtensions expert so I'll look into a standalone tool first, but if it works out ok, I'm going to get cracking on learning that stuff because I'd also like to add jUnit5 as an export format. As @barancev said, if you don't like the current state of things, roll up your sleeves and get coding or find some other more constructive ways to help than just complaining... this crew (which I should point out I'm a bystander/lurker on not member of at this time) is doing an awesome job on what I'm assuming is a shoestring, if not completely bootstrapped/volunteer-basis. Its up to all of us, the community to step up and build the features/tools we want. |
@bcmoney You're more than welcome. |
Is there any workaround to export the recorded script. I need to enhance the recorded script. I need to parameterize, add check point validation (data validation, object validation). I also need to add conditions. The recorded and play is really useless unless enhanced. I am looking for a way to export the recorded script so I can edit. |
@mgdtest: We just released some new functionality today in 3.2.0 that can get at some of your challenges. You can now add conditions to your tests with control flow commands (e.g., I'm not sure what our plans are for parameterized testing, though (that's a good question). But hopefully this helps move you closer to getting value out of your recorded scripts in the meantime. |
I checked out 3.2.0 version but I am not able to see the changes. I am not sure how to add conditions. It does not seem to support editing the code at all. Without editing the recorded code to enhance generated code. I don't see this will help my team to automate test cases. Is there away to see/edit generated script? |
@corevo "My idea is that if you have no use of editing the code once exported or if you don't have an ecosystem around a certain language, then we can do a much better job at managing these suites." -> a practical example is trying to keep your tests to one test suite - e.g. pytest - and trying to measure coverage. Good luck on this work! I'd love to see exporting to Python, personally. Great work so far on what exists, it's super easy to use and looks great 👍 |
I really don't care about adding conditionals or loops to "IDE" at this point. That ship sailed long time ago and I think that 100% of the time people use Selenium "IDE" just to grab gui elements and create a rough draft of the code to use. I have no idea who in their right mind would use it as an actual IDE and keep their tests in Selenese. Trying to add all these features that may be marginally useful while blocking the functionality that's actually being used a lot is nonsense. I think that your team is detached from reality and trying to muscle the users into particular vision of Selenium use. Thanks, but no thanks. I will find something else to use instead. You are killing off your user-base. Sometimes a simpler solution just works and there is no need to come up with anything fancier, especially at a detriment of existing functionality. |
Thanks for the feedback @oooBORISooo. It's worth keeping in mind that the IDE is used differently by different people. What might not be important to you may be important to others. Conditionals (and control flow in general) were used by many in prior versions of the IDE and this feature set landed months ago. Code export is an important feature too. We're just figuring out when to get the work done amongst everything else going on in the project. It's just me and @corevo pulling weight for the IDE, so if you want to help make code export happen sooner you're more than welcome to chip in. |
Has exporting to Python made it in to the official roadmap? |
Yes. All of the officially supported programming languages will be added for code export. |
when it will be added? |
We're going to start work on it later this month, starting with Java and working our way through the other languages after that. |
I'll be waiting for this feature. In the meantime I'll just transform it manually 😢 |
In the meantime you can use the command line runner.
It will take a Selenium IDE project file and run the tests in it
cross-browser and in parallel. With it you can run them locally, on a Grid,
headlessly, plug it in to CI, etc.
https://www.npmjs.com/package/selenium-side-runner
…On Thu, 13 Dec 2018 at 1:32 Osaetin Daniel ***@***.***> wrote:
I'll be waiting for this feature. In the meantime I'll just transform it
manually 😢
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#131 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAb5sY_3PoRKwoyouiGtET2YNHMvKyqmks5u4ZIQgaJpZM4SwFkO>
.
|
Any chance you can re-release the old version as well, I need the export to C#? |
As @tourdedave mentioned, first we'll add Java, then we will add more languages, we will go by the popularity of the bindings. |
Hello @corevo , I want to contribute to this project and add support for CodeceptJS syntax. |
Hey @evgeniy-mh, thanks for reaching out, I think that once we have the Java ones ready you will have a great implementation reference to draw from. We will make exporting available either straight from the IDE itself, for the most common use-case like Java JUnit, but also through plugins for less common use-cases, or the exports that don't use the official Selenium bindings directly, like CodeceptJS. We will make sure to update the plugins API documentation once it's available. |
Thank you, @corevo |
Not at the moment, but if you build a tool that converts it in Javascript, by reading the |
The team removed the already very used export feature to re-release it? |
Does anyone have a real world example of where someone actually uses these side files for testing a complex web app? I'm curious as to how one would actually go about doing that. I always need to do quite a lot of manual changes myself. If there are no real-world examples, maybe it would be an idea to add somewhere that this is more of a beta test? It's quite annoying to have gone through creating the entire script only to find out that one is stuck with a not all that useful .side-file. Are there any alternative tools that are able to export to Python and/or JavaScript? |
@johanneswilm What are some examples of changes you generally need to make? |
@edpichler We didn't remove it. We just didn't port everything from the legacy Selenium IDE. We're actively working on building reliable and maintainable features for the community. Code export is coming soon. We appreciate your patience, and welcome any contributions if you want to chip in and help out. |
Oh, now I understand it. I am sorry if I was rude. But it would be cool to be easy to find the old version. I was needing it but I put aside it and used JMeter because the new Selenium IDE version is not compatible with Taurus and other tools that supported Selenium. |
@tourdedave Examples for when I need to make adjustments and run other python code in the middle of a selenium test are anything that has to do with contenteditable. It's very hard or impossible to set the caret in a specific place inside of a contenteditable element and then send keys. So I need to add some JavaScript to be able to move the caret that way. I see with the new Selenium IDE seems to replace the entire element rather than send keys, so that problem has not gone away. Another example has to do with logging in where I don't actually log in but copy the values I get from the server code to the client to then be logged in. A third example is in collaborative editing tests where I need two different clients to wait on each other at different times. Some of it is waiting for things that have happened on the server side whereas other times it's waiting for things that are happening in the other client. I think a lot of this has to be programmed by hand but it used to be helpful to have less technically focused collaborators create a first version with the Selenium screen recorder. That's where I'm wondering: Are there other alternatives out there that are currently working with export to either Python or JavaScript? |
Please refer to #592 for future information. |
so when are you planning to release it? |
@lm-ahmedgehad You can follow along with the progress of code export here. The timeline is unknown since this is an open-source project. If you want to run your tests in parallel and integrate them with CI, then you can always checkout the command-line runner (link). |
Hey all,
Everything regarding the release of code export to Javascript should be discussed centrally here.
Right now the biggest issue left to resolve is parallelization, I'll submit a followup PR for that, but unless its code specific comments, keep the conversation here.
The latest beta is 3.1.0-beta.7
Please make sure that is the version used before submitting bugs.
Beta 3
No longer need to export to javascript, just run it against your
.side
files.Binaries are published as well, this way if you have the binary in
PATH
, you only need to call it in the project's root, this way, you can avoid installingnode
andnpm
.Beta 7
There is a problem with the parallelization of test cases, I'm working on that, in the meantime I'm removing the feature from 3.1.0.
3.1.0 has great features, and I don't want to delay them anymore, I'm moving this one to 3.2.0.
The text was updated successfully, but these errors were encountered: