News for hackers. Stuff that matters.
Re:Ask HN: Any Javascript Framework specific Selenium Version? by waynep on Wednesday June 03, 2009 @11:56AM (#639924)
You have complete control over which classes are assigned to what nodes.

For example if you create an alert box with ExtJS you can always add a no-op classname to it. This way you can write your Selenium test to do class based look ups and then verify the contents of the child nodes within.

Re:Ask HN: Any Javascript Framework specific Selenium Version? by digamber_kamat on Wednesday June 03, 2009 @03:10PM (#640220)
This sounds the most promising one. But say I have an Extjs COmboBox and I want to select a particular item in it. It becomes too difficult to do it your way. I have to use the Selenium.Eval function and write some javascript in it.
Re:Ask HN: Any Javascript Framework specific Selenium Version? by hugs on Wednesday June 03, 2009 @12:02PM (#639936)
If all the ids and classes are assigned during run-time, you're kinda SOL. Though Selenium does support other locator strategies like XPath, and even plain old JavaScript expressions to find an element. I would ask the the ExtJS folks how they would expect someone to test their app from a GUI perspective. You need some kind of reliable handle to find an element on the page so you can act on it.
Re:Ask HN: Any Javascript Framework specific Selenium Version? by mullr on Wednesday June 03, 2009 @10:42AM (#639813)
The only advice I can offer is to keep as much code gui-agnostic as possible. The usual advice, really, just applied to javascript. Then you can use something like http://jsunity.com/ to test most of it. Gui testing is inevitably harder anyway, even if there are tools.
Re:Ask HN: Any Javascript Framework specific Selenium Version? by hugs on Wednesday June 03, 2009 @11:57AM (#639926)
"Gui testing is inevitably harder anyway, even if there are tools"

I agree. The Selenium project could really use some volunteers to look at the major JS frameworks out there and help make them more testable with Selenium (or WebDriver, which Selenium is merging with in Se 2.0).

Re:Ask HN: Any Javascript Framework specific Selenium Version? by digamber_kamat on Wednesday June 03, 2009 @03:12PM (#640225)
jsunity I feel is for unit testing only, that is where when one has many functions with strict parameters and return values. I am not sure how it can be used for GUI testing.
Re:Ask HN: Any Javascript Framework specific Selenium Version? by soundadvice on Wednesday June 03, 2009 @03:59PM (#640301)
Re:Ask HN: Any Javascript Framework specific Selenium Version? by digamber_kamat on Saturday June 06, 2009 @12:55PM (#644893)
yes that helped a good deal, but not solved the problem completely.
Re:Ask HN: Any Javascript Framework specific Selenium Version? by mahmud on Wednesday June 03, 2009 @08:30AM (#639640)
Oh boy. Someone found a hammer and quickly ran out of thumbs.

I am developing a site

Everything that followed that utterance was a bad idea. At that point, you're not using javascript for the portability, light weight OR "scripting". You should have used any "applet" RIA technology out there and you would have been fine; java, flash, silverlight.

Re:Ask HN: Any Javascript Framework specific Selenium Version? by hymanroth on Wednesday June 03, 2009 @08:57AM (#639668)
@mahmud - what a useless, unconstructive comment. There's no reason why you can't create rich webs using an Ajax framework - in fact that's the whole reason they exist.

As regards the original question, I'm sorry I can't help. You should try the ExtJS website, they have a vibrant community there.

Re:Ask HN: Any Javascript Framework specific Selenium Version? by zcrar70 on Wednesday June 03, 2009 @09:13AM (#639690)
Neither Flash, Java or Silverlight will work with Selenium either. In fact, it's pretty hard to get any form of automated acceptance testing working with any of the RIA technologies.
Re:Ask HN: Any Javascript Framework specific Selenium Version? by digamber_kamat on Wednesday June 03, 2009 @03:16PM (#640230)
A very unuseful comment indeed.

It is a wrong perception that JS needs to be used only for portability, light weight OR "scripting". AJAX frameworks exist for a reason.

The reason being they are far more scalable, modifiable, flexible, compatible and most importantly they have seamless integration with any server side technology. Also the development is possible to break into distinct task and get them outsourced/shared as required.

I am not claiming that other technologies cant do all this but, JS based AJAX frameworks make your life easy.