Tuesday, April 29, 2014

Adapting Automatic Selenium test scripts to use Internet Explorer (IE) and Firefox

for Executing the Automated C# scripts for my tests I used the following code:

To RUN the same test in Internet explorer, a small change will be sufficient to execute similarly.see following code replacement :


To run the test for a different browser, simply supply the name of the browser as the second argument. For example, *iexploreuses Internet Explorer as the browser instead of Firefox. Use *opera for the Opera browser or *safari for Apple Safari.
Note that the browser must be supported on the operating system on which you are running the tests. You will get exceptions and, therefore, failed tests if you attempt to execute tests for a browser that doesn't exist on your operating system, such as*safari or *iexplore on a system running Linux®.

Enable Selenium Commands in Firefox

In some applications, the javascript replaces or disables the context menu's.
As a result of this the Commands of selenium do not work and you get test errors.
Simple way to fix this is simply unselecting the "Disable or replace context menus" checkbox and reload the page.
this is the easiest and fastest way to get things working.

Supporting two Gui's for QTP11.00 tests - Qualitycentre 10.00

setting the environmnet variable on the QTP machine to support two types of GUI's
thus the same machine can then be used for both the nighty builds. only in the qtp init function i added the code where it is checked what gui type is it. for both specific tests a specific gui tpe: new or old is set using the environment variables file in qtp and then with help of windows env variable this value is compared and overwritten for test executions.








Json extractor and While loop

Waiting for a specific value in response of api request. using while loop. Add a While Loop. The api requets will be executed inside th...