Using KATLON user can automate or run the script on below mentioned browsers
- Chrome (56)
- Firefox (51)
- Safari 5.1 +
- Internet explorer
- EDGE
In order to record , run / Automate script in Internet Explorer need to perform below setting for Internet Explorer.
- Security level for all zones should be same under (Internet Properties -> Security)
- Enable “Enhanced Protected Mode” must be disabled. (Internet Properties ->Advanced tab)
- Set Zoom level to 100%
- Search for FEATURE_BFCACHE subkey at below mentioned location based on system requirement
If Windows is 32-bit then key is at: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.
If Windows is 64-bit then key is at: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.
If FEATURE_BFCACHE key is not available then create it and then inside this subkey create a DWORD value named iexplore.exe with the value of 0.
Below code is to launch browser then open URL and Close the Browser.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase import static com.kms.katalon.core.testdata.TestDataFactory.findTestData import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile import com.kms.katalon.core.model.FailureHandling as FailureHandling import com.kms.katalon.core.testcase.TestCase as TestCase import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory import com.kms.katalon.core.testdata.TestData as TestData import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository import com.kms.katalon.core.testobject.TestObject as TestObject import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI 'launch browser' WebUI.openBrowser('') 'maximaize the browser which will fit to screen.' WebUI.maximizeWindow() 'open url for e.g www.mundrisoft.com' WebUI.navigateToUrl('www.mundrisoft.com') 'closed the opened browser' WebUI.closeBrowser() |
To run above (KATALON) code on Edge browser , identify the correct build number by typing “winver” on command prompt.
Based on the build number download the respective web-driver available at this location and run the setup.