czwartek, stycznia 28, 2010

Problem z Selenium

Selenium server w wersji 1.0.1
Firefox w wersji 3.6

Dzisiaj przekonałem się, że zautomatyzowane testy, w ramach nieustającej integracji to nie taka prosta sprawa. Jak w przypadku IE (tfu, tfu - kysz, kysz) wszystko działa dobrze i tak jak powinno, to w przypadku Firefoxa Selenium raczyło mnie takim oto uroczym błędem:
Today, I realized that automated tests, withing continuous integration build are not easy task to do. When it comes to IE, everything works well and as it was expected, but in Firefox it ends with very nice error:
RuntimeException: Firefox refused shutdown while preparing a profile
No pięknie, z tego co widać w menedżerze zadań, przeglądarka się uruchamia jednak nie wykonuje żadnych testów. Pogrzebawszy w Internecie, znalazłem rozwiązane, niestety nie jestem w stanie podać linka do źródła - zagubił mi się gdzieś.
When I opened task manager, I can see that browser is up and running, but it refuse to make any tests. After short intercourse with Internet I found solution, but I'm unable to put a link to it because I lost it somewhere in the meantime.

Winnym całego zamieszania jest niedawny update Firefoxa do wersji 3.6, zaszyte wewnątrz Selenium pluginy do przeglądarki są przycięte do wersji 3.5., przy uruchamianiu pojawia się okienko z informacją o niezgodnych pluginach i na tym przeglądarka zawisa. Aby to naprawić (tymczasowo), należy przejrzeć katalogi wewnątrz jara selenium zaczynające się od customProfileDir..., i w każdym pliku install.rdf zamienić odwołanie 3.5.* na 3.6.*, lub jak kto woli 4.*. Po zmianie należy te pliki wrzucić z powrotem do pakietu serwera i dzięki temu wszystko powinno działać prawidłowo.
Guilt for this whole mess is the last update for Firefox to version 3.6. Inside of Selenium there is a pack of browser plugins which will work in Firefox 3.5, but not higher than that. When browser starts it shows window, that some plugins are to old and it hangs in this window waiting for user reaction. To fix this (temporary), you should browse inside server package (jar), inside of directories starting at customProfileDir.., and inside of every single plugin directory, in each install.rdf file change required version from 3.5.* to 3.6.* or when it is necessary to 4.*. After change files should be inserted inside of jar archive, and after this everything should work correctly.

Brak komentarzy:

Prześlij komentarz