!!

Welcome to Selenium Webdriver Forum

As a web user you can read and search through forum content. Once you have registered and signed you can post topics, post replies, set up watch lists, modify forum settings, and use private messaging.

Author Topic: Accessing all test cases in Se IDE core extension  (Read 246 times)

Peter Kehl

  • Web User
Accessing all test cases in Se IDE core extension
« on: April 12, 2012, 06:19:10 PM »
Hi. I'm trying to enhance SelBlocks (more in a comment to
 http://wiki.openqa.org/display/SEL/Selblocks). My problem seems to be
 on Se IDE core extension level.
 In Se IDE core extension, I'm tail-overriding
 Selenium.prototype.reset(), overriding
 testCase.debugContext.nextCommand() etc. There I need to access the
 list of all test cases - like the one that is available in testCase
 global. The goal is to get a unique identifier (number, filename...)
 per each test case (unique within the test suite) and to access
 commands of all test cases at any time during test run.
 
So, I've tried to tail-intercept but that is not used by the object
 stored in testCase global. I've tail-intercepted TestCase (that's the
 constructor used to create testCase) and I made it push 'this'
 instance to a global array, so that I could access it as a list of
 test cases (it wouldn't reflect removed test cases, but nevermind that
 yet). However, that global array is empty when a test suite is run. As
 an alternative, I've tried to represent that array as a 'static'
 variable in a function, but again - that is empty when test suite is
 run, and it gets re-initialized. So there is some kind of namespace/
 barrier which clears/separates the global variables.
 
function selTestCases() {
     if( typeof selTestCases.cases =='undefined' ) {
         alert('initializing selTestCases.cases');
         selTestCases.cases= [];
     }
     return selTestCases.cases;
 

}
 

How could I access/pass all test cases there (comparable to testCase
 global), please? Is it possible in Se core extension at all?
 Thanks.

Ross Patterson

  • Web User
Re: Accessing all test cases in Se IDE core extension
« Reply #1 on: April 12, 2012, 06:19:27 PM »
I'm not a Selenium IDE guy, but I think what you're looking for is the Application object's testSuite member.
 Ross
 

- Show quoted text -

Ross Patterson

  • Web User
Re: Accessing all test cases in Se IDE core extension
« Reply #2 on: April 12, 2012, 06:19:41 PM »
While looking into Peter's question, I realized there are a bunch of wiki pages at http://wiki.openqa.org that aren't in the GoogleCode wiki.  Should someone be looking at the old OpenQA site to bring stuff over to Selenium's new(er) home?
 Ross
 

- Show quoted text -

Selenium Webdriver

Re: Accessing all test cases in Se IDE core extension
« Reply #2 on: April 12, 2012, 06:19:41 PM »

Adam Goucher

  • Web User
Re: Accessing all test cases in Se IDE core extension
« Reply #3 on: April 12, 2012, 06:19:53 PM »
I would say not worry about it. Se-IDE and it's place in the whole mix
 is getting less and less focus (intentionally) in place of writing,
 maintainable, good automation. Most of the user-extensions and such on
 the old wiki just help people write bad, brittle, automation. One thing
 SeConf proved last year was that, as a community, we have blessed the
 idea of WebDriver powered Page Object based scripts with the recommended
 path. By moving stuff over to SeHQ or GC there is an implicit blessing
 that they both should work and that they should be used. Which is not
 the case.
 -adam (who is thinking there could be value in killing Se-IDE and let
 the Se-Builder folks deal with the problem)
 

- Show quoted text -

Peter Kehl

  • Web User
Re: Accessing all test cases in Se IDE core extension
« Reply #4 on: April 12, 2012, 06:20:06 PM »
Thanks Ross;
 editor.app.showTestCaseFromSuite(editor.app.getTestSuite().tests[index])
 worked for me.
 Adam,
 
is there any visual tool to record Se test cases (and export them to
 Java etc.), other than Se-IDE?
 
I've got an idea of how Se-IDE could be more useful. Where could I
 post some notes about it - to Se Google wiki? Could someone allow me
 to do that, please?
 - Peter
 
On Nov 8, 5:25 am, Adam Goucher <a...@goucher.ca> wrote:
 

- Show quoted text -

 

Related Topics

  Subject / Started by Replies Last post
6 Replies
701 Views
Last post February 22, 2012, 06:12:11 PM
by amit rawat
3 Replies
694 Views
Last post March 28, 2012, 04:05:08 PM
by neversaydie
1 Replies
393 Views
Last post April 03, 2012, 02:32:21 PM
by Tarun Bhadauria
4 Replies
283 Views
Last post April 12, 2012, 07:12:58 PM
by Peter Kehl
1 Replies
481 Views
Last post April 15, 2012, 05:44:47 PM
by Kumar
2 Replies
752 Views
Last post April 15, 2012, 05:56:36 PM
by selenium_freak
15 Replies
933 Views
Last post May 01, 2012, 09:35:55 PM
by Sasi kumar

Review www.seleniumwebdriver.com on alexa.com