0

Our company sells a testing suite that is able to run selenium tests, among several other protocols.

To use it, the end user installs both our application and the selenium server file.

When users write their test cases based on the commands they use in the IDE, every command works on the Selenium Server, except for the echo command. Which is apparently a known limitation of the Selenium Server, every IDE command works except for echo.

This is apparently an intentional configuration: echo command not found while testing selenium with phpunit

We can't seem to figure out a way for our application to get variables back out of Selenium Server once they are stored... since the echo command that works on the IDE returns an error from Selenium Server.

There are Selenium Server bindings for several languages, but not for our application. Since our application and Selenium Server are being distributed to end users in a Windows environment -- no third party languages are installed on the systems by default, like Java, c-sharp, python, etc.

Is there a workaround for getting variables out of Selenium Server without installing an entire programming language onto each end user's PC?

Cœur
  • 37,241
  • 25
  • 195
  • 267
some1
  • 1,547
  • 8
  • 26
  • 45
  • 2
    Selenium server depends on Java, doesn't it? Or how are you planning to execute selenium server without it? – Erki M. Oct 30 '14 at 19:01

2 Answers2

0

I don't know anything about selenium, however .Net is pretty well installed on every windows version back to XP (well for XP you'd have to install it yourself) See What version of the .NET framework is installed on Windows XP, Vista, and 7?

So you should have access to things like C# (or any .Net language) in which to write your solution. How ever that may mean installing a custom bit of software to take the place of you Echo. (But as I said I know nothing about selenium)

Community
  • 1
  • 1
Peter M
  • 7,309
  • 3
  • 50
  • 91
0

Not sure whether this will help. I wrote a user-extension command to be able to get variable values in my log file. The new command takes same argument as the echo command, and one extra argument that tells on what LOG level the output needs to be given. For data driven testing I use the 'warn' level to filter out all the info LOG messages that are used in the command for data reading and looping.

    Selenium.prototype.doEchoLog = function(strMessage, Level) {   
/**
  * Prints the specified message into the Log (log file) using the level as indicated in the second argument 
  *
  * @param strMessage the message to print
  * @param Level denote the logging level to be used for this message (debug | info | warn | error)
  */

// translate the Level value to a usable one letter value        
    Level = Level.substring(0,1);
    // output the given message to the Log at the indicated level
    if (Level == "d" ) { LOG.debug(strMessage);
    } else if (Level == "i" ) { LOG.info(strMessage);
    } else if (Level == "w" ) { LOG.warn(strMessage);
    } else if (Level == "e" ) { LOG.error(strMessage);
    } else LOG.error("use: echoLog <text> <debug|info|warning|error>");
}