- Thomas0286
- Posts : 4
Join date : 2013-09-11
Location : Dresden, Germany
Including self writen command to the formatter
Wed Sep 11, 2013 8:19 pm
Hi,
i have writen a command for Selenium IDE as user extension. Now i like to include it to the Java Formatter. When doing this it says "unknown command" after converting. How can i correcly include my code to the formatter?
Thx in advance,
Thomas
i have writen a command for Selenium IDE as user extension. Now i like to include it to the Java Formatter. When doing this it says "unknown command" after converting. How can i correcly include my code to the formatter?
Thx in advance,
Thomas
- ccoxMaster
- Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO
Re: Including self writen command to the formatter
Tue Sep 17, 2013 2:38 am
Why not just write the command in Java?
- Thomas0286
- Posts : 4
Join date : 2013-09-11
Location : Dresden, Germany
Re: Including self writen command to the formatter
Wed Sep 18, 2013 12:35 am
How do you mean that?
My Problem is that i need the SeleniumIDE Command. The Selenium IDE Test Case will be converted to selenium Webdriver (java) format later.
My Problem is that i need the SeleniumIDE Command. The Selenium IDE Test Case will be converted to selenium Webdriver (java) format later.
- ccoxMaster
- Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO
Re: Including self writen command to the formatter
Wed Sep 18, 2013 12:59 am
If you are already converting the scripts to Java, write the command in Java when you convert them over. It doesn't make sense to have the formatter magically convert js to Java. Plus you would have to write the command in Java for the formatter to work anyway(if it's even available for you to add commands to the formatter).
- Thomas0286
- Posts : 4
Join date : 2013-09-11
Location : Dresden, Germany
Re: Including self writen command to the formatter
Wed Sep 18, 2013 2:00 am
I don't get it...
how can i do this?
I need some aditional commands for seleniumIDE. E.g. i have a command to write in a TinyMCE Window(i know this is possible by adding the RunScript command, but it should be as easy to use as possible). I Record the Testcase with SeleniumIDE, then i chose where the command has to be included. Then i like to export it.
Can u tell me the steps i have to take?
Thx in advance,
Thomas
how can i do this?
I need some aditional commands for seleniumIDE. E.g. i have a command to write in a TinyMCE Window(i know this is possible by adding the RunScript command, but it should be as easy to use as possible). I Record the Testcase with SeleniumIDE, then i chose where the command has to be included. Then i like to export it.
Can u tell me the steps i have to take?
Thx in advance,
Thomas
- ccoxMaster
- Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO
Re: Including self writen command to the formatter
Wed Sep 18, 2013 2:11 am
Steps:
1) Stop thinking about the IDE formatter and do it manually
2) Write your command in Java
3) When you export your IDE scripts to Java, replace the line where it says unsupported command with your Java command.
1) Stop thinking about the IDE formatter and do it manually
2) Write your command in Java
3) When you export your IDE scripts to Java, replace the line where it says unsupported command with your Java command.
- Thomas0286
- Posts : 4
Join date : 2013-09-11
Location : Dresden, Germany
Re: Including self writen command to the formatter
Wed Sep 18, 2013 2:18 am
Can i perform step 3 automaticly?
The problem is that it would be great if i could handle this converting thing with the formatter.
It would be a solution for my diploma thesis. The Task is that users with low to very low programming skills also can create good Testcases which can also handle dynamic webpages. I have writen a lot of aditional commands for the IDE and they work good. But now i have the problem to create a Java file from them. It is no good solution to open these files again and edit them. Do u have any idea to solve that?
The problem is that it would be great if i could handle this converting thing with the formatter.
It would be a solution for my diploma thesis. The Task is that users with low to very low programming skills also can create good Testcases which can also handle dynamic webpages. I have writen a lot of aditional commands for the IDE and they work good. But now i have the problem to create a Java file from them. It is no good solution to open these files again and edit them. Do u have any idea to solve that?
- ccoxMaster
- Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO
Re: Including self writen command to the formatter
Wed Sep 18, 2013 2:50 am
Unfortunately I think the only way to do this would be to write your own formatter add-in for IDE.
One possible solution is running these on Selenium RC from the command prompt. You wouldn't need to export the test cases at all and could run them against other browsers.
Should these users have any Java development experience? Are the commands too complex for them to create?
Another suggestion would be to add the code in the form of comments to Selenium IDE. When they export it, I think the comments will export as well. Then they can just uncomment the code. I know it's a manual workaround, but it could work for beginners
One possible solution is running these on Selenium RC from the command prompt. You wouldn't need to export the test cases at all and could run them against other browsers.
Should these users have any Java development experience? Are the commands too complex for them to create?
Another suggestion would be to add the code in the form of comments to Selenium IDE. When they export it, I think the comments will export as well. Then they can just uncomment the code. I know it's a manual workaround, but it could work for beginners
Permissions in this forum:
You cannot reply to topics in this forum