We needed this library because we wanted to have stable automated tests against different browsers and on different platforms for RichFaces functional testing. It encapsulates good functionalities for testing AJAX behaviours and is ready for testing Firefox and Internet Explorer. Its' first implementation is used for testing RichFaces 3.3.X in 403 unique tests for in over 76 test cases for each RichFaces component.
Internet Explorer ready
What makes this project unique is its own implementation of own HttpCommandProcessor which enables functionality in Internet Explorer – it handles known Permission denied exceptions in Selenium when you are trying to access JavaScript from TestRunner window before the page is loaded. This is caused by security model of Internet Explorer and really harden usage of selenium functions in Internet Explorer in comparison to Firefox.
JQuery Selectors over the XPath
The support for JQuery Selectors as location strategy isn't unique but it is complete and nice to have to support multiple browsers for test. This makes test suite run with Internet Explorer more reliable. This browser has at the moment very slow Xpath evaluator and that's why test cases written in this language suffer in execution speed. Implementation of JQuery Selectors to our test cases was simple, but we had to rewritte all of the locators to JQuery Selector syntax. It actually reduced execution time from 4:30hr to 1:30hr and made lots of test cases pass. It enabled to have same test suites for Firefox and Internet Explorer.
Testing Dragable
Also the Drag class is important – it encapsulates sequence of commands to drag one object to target object and enables testing of behaviour of dragged object in each phase of dragging sequence. Nice for testing Drag-and-Drop support in RichFaces.
Waiting-improved
Waiting for satisfying conditions
The last big feature which needs to be mentioned is Wait class. It is similar to Wait class from Selenium 1.0, but it has much more readable and customizable syntax, for example:
Wait.dontFail().timeout(5000).interval(500).until(new Condition() { … })
or
Waiting waitForModelUpdate = Wait.timeout(30000).interval(2000);
waitForModelUpdate.failWith(“Causes {0}”, someObjectToFormat).until(new Condition() { … });
Customizable behaviour of failure
It wasn't something what we could not implement with Selenium's Wait class (except the dontFail/failWith handling the resulting exception when waiting timeouts).
Wait for change conditions
Pretty usable is also addition of waitForChange(...) and waitForChangeAndReturn(...) methods. Its purpose is also quite self-describing. Sample followes:
waitForModelUpdate.waitForChange(“phase 2”, new Retrieve
Maven-based integration
What I'm really proud of is Maven configuration for Selenium tests (it isn't a part of the library yet, but we are planning so). For better overview, take a look at readme doc or POM. It enables us to have same configuration for Windows and Linux Hudson machines incl. various browsers (Firefox and IE) and various containers (JBossAS and Tomcat). It contains selenium-maven-plugin, cargo deployer and maven-surefire-plugin executing test suite. Really nice is the debugging feature (look for Debugging in readme.html) when you are running the SeleniumServer on one host, container on another host and you are running test suite in debugging mode from your preferred IDE.
Stay warmed...
Please keep an eye on this blog space. We are planning new version of richfaces-selenium library introducing type-safety and commonness to full-featured AJAX testing!
How to start?
Source code of richfaces-selenium library
RichFaces LiveDemo and it's test-suite
(example of test case - Editable Table with Modal Panel)
looks great!
ReplyDeleteI am getting an error message that says the fields does not exist.
ReplyDeleteI could map the field using:
WebElement modalPanel = driver.findElement(By.id("corpo:formulario:painelGenericoContainer"));
WebElement dsArquivo = modalPanel.findElement(By.xpath("//*[@id='corpo:formulario:dsArquivo']"));
But I could not sendKeys using:
dsArquivo.sendKeys("testing");
It displays the following error message:
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"xpath","selector":"//*[@id='corpo:formulario:despachanteText']"}
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.5.0', revision: '13516', time: '2011-08-23 18:30:44'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_27'
Driver info: driver.version: RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:131)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:105)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:409)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:191)
at org.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:114)
at org.openqa.selenium.remote.RemoteWebElement.findElementByXPath(RemoteWebElement.java:167)
at org.openqa.selenium.By$ByXPath.findElement(By.java:350)
at org.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:110)
at org.openqa.selenium.example.Script_003.runTest003(Script_003.java:63)
at org.openqa.selenium.example.Script_003.main(Script_003.java:115)
Can you help me?
Hi , Thanks for the article and its very informative.
ReplyDeleteI am facing a problem in checking out the code from
http://anonsvn.jboss.org/repos/richfaces/branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/
tried to check out svn co "URL" and tortoise svn client as well,
Error running context: No connection could be made because the target machine
Awesome blog! I'm really glad that I found your article. This is really helpful. Keep sharing more such posts.
ReplyDeleteManual Testing Training in Chennai
Manual Testing Training in Tambaram
Manual Testing Training in Porur
Oracle DBA Training in Chennai
Unix Training in Chennai
Embedded System Course Chennai
IoT Training in Chennai
This comment has been removed by the author.
ReplyDeleteThanks for providing the information . The articles in your blog helped me.
ReplyDeleteSelenium Training in chennai | Selenium Training in anna nagar | Selenium Training in omr | Selenium Training in porur | Selenium Training in tambaram | Selenium Training in velachery
Fake Bank Statement
ReplyDeleteFake Bank Statement
Fake Bank Statement
Fake Bank Statement
Fake Bank Statement
Fake Bank Statement
Fake Bank Statement
Fake Bank Statement
Fake Bank Statement
ReplyDeleteFake Bank Statement
Fake Bank Statement
Fake Bank Statement
Fake Bank Statement
Fake Bank Statement
Fake Bank Statement
Fake Bank Statement
I am always searching online for articles that can help me. There is obviously a lot to know about this. I think you made some good points in Features also. Keep working, great job !
ReplyDeleteAmazon Web Services Training in Chennai
coin haber - koin haber - kripto para haberleri - coin haber - instagram video indir - instagram takipçi satın al - instagram takipçi satın al - tiktok takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - binance güvenilir mi - binance güvenilir mi - binance güvenilir mi - binance güvenilir mi - instagram beğeni satın al - instagram beğeni satın al - google haritalara yer ekleme - btcturk güvenilir mi - binance hesap açma - kuşadası kiralık villa - tiktok izlenme satın al - instagram takipçi satın al - sms onay - paribu sahibi - binance sahibi - btcturk sahibi - paribu ne zaman kuruldu - binance ne zaman kuruldu - btcturk ne zaman kuruldu - youtube izlenme satın al - torrent oyun - google haritalara yer ekleme - altyapısız internet - bedava internet - no deposit bonus forex - erkek spor ayakkabı - tiktok jeton hilesi - tiktok beğeni satın al - microsoft word indir - misli indir - instagram takipçi satın al
ReplyDeleteucuz takipçi
ReplyDeleteucuz takipçi
tiktok izlenme satın al
binance güvenilir mi
okex güvenilir mi
paribu güvenilir mi
bitexen güvenilir mi
coinbase güvenilir mi
world777 official
ReplyDeletebest coaching classes for class 11 in gurgaon
junior accountant dairy
laboratory furniture supplier
perde modelleri
ReplyDeletesms onay
mobil ödeme bozdurma
nft nasıl alınır
ankara evden eve nakliyat
Trafik sigortasi
dedektör
Website kurma
ask romanlari
This exact is by and large evidently stinky and close by fantastic convincing along at the rear of without a doubt legit disapproved what's more as a matter of fact helpful My impact is trying to view as in front assumed for this remarkable valuable stuffs. Windows 10 Crack Key
ReplyDeletependik vestel klima servisi
ReplyDeleteçekmeköy vestel klima servisi
çekmeköy bosch klima servisi
çekmeköy arçelik klima servisi
kadıköy mitsubishi klima servisi
kartal vestel klima servisi
ümraniye vestel klima servisi
beykoz alarko carrier klima servisi
üsküdar alarko carrier klima servisi
en son çıkan perde modelleri
ReplyDeletenft nasıl alınır
en son çıkan perde modelleri
yurtdışı kargo
özel ambulans
lisans satın al
minecraft premium
uc satın al
Get access to all certification questions and answers:
ReplyDeletescrum certification exam questions
safe for teams exam answers
google ads search certification answers
google ads measurement certification answers