Sunday, March 7, 2021

Rest API Testing using Robot Framework and Python

 Environment Setup

-----------------------------

Pre-requisites:

    1) Python - Download python exe file from python official site https://www.python.org/downloads/ and install in your work station. 

    2) Pycharm IDE: Download and install PyCharm community version from their official site: https://www.jetbrains.com/pycharm/download/#section=windows


Install Following Libraries using through command Line:

1) robot framework --- pip install robotframework

2) requests -- pip install requests

3) robotframework-requests -- pip install  robotframework-requests

4) robotframework-jsonlibrary -- pip install robotframework-jsonlibrary

Thursday, February 22, 2018

Monday, January 30, 2017

IE-11 Settings for selenium web driver

Internet Explorer sometimes requires manual configuration to set up. This page lists the known situations where this is the case.

Internet Explorer 11

Unfortunately, Microsoft has not yet made IE 11 fully compatible with this driver. As a result, you may sometimes get exceptions with the following message when starting IE :
Unable to get browser
To work around this problem, you need to apply a registry key. Please right-click on one of the two links below (depending on your version of Windows) and select Save as... to pick a download location:
Then, apply the registry patch by double-clicking on it and confirming. This should resolve unsupported issues with IE 11.
Another, more recent problem is caused by Windows update KB3025390, which was released by Microsoft in December 2014. This update breaks Selenium's support for Internet Explorer 11. You may find a workaround in the Selenium issue on the subject. If not, the only way we know of to get IE 11 to work again is to uninstall this update from the Windows Update management panel. This problem may also result in the InvalidSelectorException described below.

Protected mode settings

If you get an exception similar to the following when starting Internet Explorer from Helium:
WebDriverException: Error launching IE: Protected Mode settings
are not the same for all zones. Please follow these steps:
http://heliumhq.com/docs/internet_explorer#protected_mode
Then you need to update IE's security settings. To do this, select "Internet options" from the Tools menu (or the gear icon in the toolbar in later versions). Open the Security tab. At the bottom of the dialog for each of the zones ("Internet", "Local intranet", "Trusted sites" and "Restricted sites"), you should see a check box labeled "Enable Protected Mode". Set the value of the check box to the same value, either checked or unchecked, for each zone. In the following screenshots, the check box has been unchecked for all zones. Click on the images to enlarge:

Running local HTML pages

If you run local HTML pages (ie. HTML files residing on your harddisk)  in IE, you may see a popup saying "Internet Explorer restricted this webpage from running scripts or ActiveX controls":
You may also get an error similar to the following when trying to use selenium

with IE:
selenium.common.exceptions.InvalidSelectorException: Message:
u"The xpath expression '[...]' cannot be evaluated or does
notresult in a WebElement"
To fix this, please go to "Internet options" in the Tools menu (or the gear icon in newer versions). Open the Advanced tab. Scroll down to "Security" and select "Allow active content to run in files on My Computer". Here is a screenshot for reference (click to enlarge):



If the error persists and you are running Internet Explorer 11, then it is likely that it is Windows update KB3025390 which is causing the issue. 
For more information: 
http://heliumhq.com/docs/internet_explorer

Wednesday, February 3, 2016


Handle Web Message in selenium (C#)



public static void checkAlert(IWebDriver driver) {
try {
// WebDriverWait(driver, TimeSpan.FromSeconds(10)).Until(ExpectedConditions.ElementExists(element)); WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
wait.Until(ExpectedConditions.TitleIs("Message from webpage"));
IAlert alert = driver.SwitchTo().Alert();
alert.Accept(); }
catch (Exception e) { //exception handling
}
}

Tuesday, January 12, 2016

Characteristics of a good 'Tester':
1. Ensure End User Satisfaction
2. You understand priorities
Update coming soon.....

Rest API Testing using Robot Framework and Python

 Environment Setup ----------------------------- Pre-requisites:     1) Python - Download python exe file from python official site  https:/...