How To open Dev tools in katalon after i place my project Url in Browser? and perform execution


#1

Hi

Due to budget constraints ,my company wants to execute katalon scripts which are developed using desktop to be executed in Chrome mobile version using Dev Tools

.My question is

1)How can i open Dev tools in katalon after i place my project Url in Browser?and perform execution in Mobile mode of chrome

2)Locators which are used in script,will it be compatible in Mobile version of chrome?

Here is my dekstop version of code

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

import internal.GlobalVariable as GlobalVariable

import org.openqa.selenium.JavascriptExecutor as JavascriptExecutor

import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory

import com.kms.katalon.core.webui.common.WebUiCommonHelper as WebUiCommonHelper

import org.openqa.selenium.Keys as Keys

for (def index : (1…27)) {

WebUI.openBrowser('')



WebUI.maximizeWindow()



WebUI.navigateToUrl('http://172.16.81.78/timetrax/#/login')

  

WebUI.sendKeys(findTestObject('TimeTraxUserLogin/Page\_TimeTraxUi/input\_userName'), findTestData('Excel Data source/Timesheet\_input\_data').getValue(

        1, 4))



WebUI.sendKeys(findTestObject('TimeTraxUserLogin/Page\_TimeTraxUi/input\_passWord'), findTestData('Excel Data source/Timesheet\_input\_data').getValue(

        2, 4))



WebUI.click(findTestObject('TimeTraxUserLogin/Page\_TimeTraxUi/button\_Sign In'))



WebUI.click(findTestObject('EmployeeClick/Page\_About Screen/span\_TimeEntries'))



WebUI.delay(5)



WebUI.click(findTestObject('EmployeeClick/Page\_User Screen/span\_TimeSheet'))



WebUI.doubleClick(findTestObject('TimeSheet/ModalSection/TS\_MS\_Btn_PlusSign'))



WebUI.delay(3)



WebUI.sendKeys(findTestObject('TimeSheet/ModalSection/TS\_MS\_Txt\_Employee'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        3, 4))



WebUI.delay(1)



WebUI.click(findTestObject('TimeSheet/ModalSection/TS\_MS\_Btn_ClickEmployeeAutoComplete'))



WebUI.click(findTestObject('TimeSheet/ModalSection/TS\_MS\_DD_EmployeeRemoveDropDown'))



WebUI.sendKeys(findTestObject('TimeSheet/ModalSection/TS\_MS\_Date\_WorkDate'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        14, index))



WebUI.delay(1)



WebUI.waitForElementClickable(findTestObject('TimeSheet/ModalSection/TS\_MS\_DD_selectWorkGroup'), 3)



WebUI.click(findTestObject('TimeSheet/ModalSection/TS\_MS\_DD_selectWorkGroup'))



WebUI.selectOptionByLabel(findTestObject('TimeSheet/ModalSection/TS\_MS\_DD\_selectWorkGroup'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        10, 4), false)



WebUI.delay(1)



WebUI.click(findTestObject('TimeSheet/ModalSection/TS\_MS\_DD_PositionToRemoveDependentDropDown'))



WebUI.waitForElementClickable(findTestObject('TimeSheet/ModalSection/TS\_MS\_Txt_Position'), 3)



WebUI.click(findTestObject('TimeSheet/ModalSection/TS\_MS\_Txt_Position'))



WebUI.selectOptionByLabel(findTestObject('TimeSheet/ModalSection/TS\_MS\_Txt\_Position'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        6, 4), false)



WebUI.waitForElementClickable(findTestObject('TimeSheet/ModalSection/TS\_MS\_DD_PayCategory'), 3)



WebUI.click(findTestObject('TimeSheet/ModalSection/TS\_MS\_DD_PayCategory'))



WebUI.selectOptionByLabel(findTestObject('TimeSheet/ModalSection/TS\_MS\_DD\_PayCategory'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        7, 1), false)



WebUI.sendKeys(findTestObject('TimeSheet/ModalSection/TS\_MS\_Date\_StartDate'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        14, index))



WebUI.sendKeys(findTestObject('TimeSheet/ModalSection/TS\_MS\_Date\_StartTime'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        18, 1))



WebUI.sendKeys(findTestObject('TimeSheet/ModalSection/TS\_MS\_Date\_EndDate'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        14, index))



WebUI.sendKeys(findTestObject('TimeSheet/ModalSection/TS\_MS\_Date\_EndTime'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        18, 2))



WebUI.sendKeys(findTestObject('TimeSheet/ModalSection/TS\_MS\_Txt_comments'), 'Project B')



WebUI.doubleClick(findTestObject('TimeSheet/SearchSection/TS\_MS\_Btn_ClickSave'))



WebUI.rightClick(findTestObject('TimeSheet/SearchSection/TS\_MS\_Btn_ClickSave'))



WebUI.waitForElementAttributeValue(findTestObject('TimeSheet/SearchSection/TS\_MS\_Date_SearchWorkDate'), 'Error', 'Saved', 

    5)



WebUI.click(findTestObject('TimeSheet/SearchSection/TS\_MS\_DD_Status'))



WebUI.selectOptionByLabel(findTestObject('TimeSheet/SearchSection/TS\_MS\_DD_Status'), 'Saved', false)



WebUI.waitForElementPresent(findTestObject('TimeSheet/SearchSection/TS\_MS\_Date_SearchWorkDate'), 3)



WebUI.click(findTestObject('TimeSheet/SearchSection/TS\_MS\_Date\_SearchWorkDate'), FailureHandling.STOP\_ON_FAILURE)



WebUI.sendKeys(findTestObject('TimeSheet/SearchSection/TS\_MS\_Date\_SearchWorkDate'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        14, index))



WebUI.waitForElementHasAttribute(findTestObject('TimeSheet/SearchSection/TS\_MS\_DD_ViewType'), 'Employee', 1)



WebUI.click(findTestObject('TimeSheet/SearchSection/TS\_MS\_DD_ViewType'))



WebUI.selectOptionByLabel(findTestObject('TimeSheet/SearchSection/TS\_MS\_DD_ViewType'), 'Employee', false)



WebUI.waitForElementClickable(findTestObject('TimeSheet/SearchSection/TS\_MS\_Btn_Employee'), 5)



WebUI.sendKeys(findTestObject('TimeSheet/SearchSection/TS\_MS\_Btn\_Employee'), findTestData('Excel Data source/Timesheet\_input_data').getValue(

        3, 4))



WebUI.delay(1)



WebUI.click(findTestObject('TimeSheet/ModalSection/TS\_MS\_Btn_ClickEmployeeAutoComplete'))



WebUI.waitForElementPresent(findTestObject('TimeSheet/SearchSection/TS\_MS\_Btn_ClickSearch'), 1)



WebUI.click(findTestObject('TimeSheet/SearchSection/TS\_MS\_Btn_ClickSearch'))



WebUI.delay(2)



WebUI.waitForElementClickable(findTestObject('TimeSheet/SearchSection/TS\_MS\_Btn_ClickSubmit'), 1)



WebUI.doubleClick(findTestObject('TimeSheet/SearchSection/TS\_MS\_Btn_ClickSubmit'))



WebUI.rightClick(findTestObject('TimeSheet/SearchSection/TS\_MS\_Btn_ClickSubmit'))



WebUI.delay(2)



WebUI.closeBrowser()

}