Skip to main content

Posts

Showing posts with the label selenium1

Simulating Keyboard strokes using Selenium1

Many a times we want to simulate keyboard strokes in our selenium tests. Here is how you can do this using Selenium1.   Command: selenium.keyPressNative(<KeyEvent_TobePassed>);   For Ex: If you want to simulate pressing Tab then you need to pass the command: selenium.keyPressNative(java.awt.event.KeyEvent.VK_TAB+"");   View the list of KeyEvents here: http://docs.oracle.com/javase/1.4.2/docs/api/java/awt/event/KeyEvent.html   Hope this helps!

AJAX Testing–Some Useful Links

Testing dynamic elements is always a challenge. I found some interesting/useful links which might prove useful to you too: http://agilesoftwaretesting.com/selenium-wait-for-ajax-the-right-way/ http://stackoverflow.com/questions/6850994/wait-for-javascript-file-to-load-in-selenium-2 http://saucelabs.com/blog/index.php/2011/04/how-to-lose-races-and-win-at-selenium/   Happy Testing!!!!

Selenium n Safari

For all those who are stuck running Selenium tests on Safari... Here are a couple of tips: If you are using any version before 5 of Safari You can run your tests using any RC versions > 1.0 If you tests doesn't run then please verify the following:  Enable popup's on Safari - I know I sound silly but believe me thats the only issue sometimes Try running your tests using *safariproxy Verify the path given for the safari executable - it should be something like: C:\ProgramFiles\Safari\Safari.exe If you are using version 5.1  Then you have to run your tests on RC version 1.0.3 only Also change your tests to run using *safariproxy Don't forget enable pop ups :)  Even after doing all this - you'll still need an All the Best !!! And if you have a choice then pls run your tests on Safari Mac :)