Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
Thomas0286
Posts : 4
Join date : 2013-09-11
Location : Dresden, Germany

Including self writen command to the formatter Empty 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
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO

Including self writen command to the formatter Empty Re: Including self writen command to the formatter

Tue Sep 17, 2013 2:38 am
Why not just write the command in Java?
avatar
Thomas0286
Posts : 4
Join date : 2013-09-11
Location : Dresden, Germany

Including self writen command to the formatter Empty 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.
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO

Including self writen command to the formatter Empty 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).
avatar
Thomas0286
Posts : 4
Join date : 2013-09-11
Location : Dresden, Germany

Including self writen command to the formatter Empty 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
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO

Including self writen command to the formatter Empty 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.
avatar
Thomas0286
Posts : 4
Join date : 2013-09-11
Location : Dresden, Germany

Including self writen command to the formatter Empty 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?
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO

Including self writen command to the formatter Empty 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
Sponsored content

Including self writen command to the formatter Empty Re: Including self writen command to the formatter

Back to top
Permissions in this forum:
You cannot reply to topics in this forum