엄지월드

[Katalon] WebUI.verifyElementText() 명령어 본문

QA/Katalon UI 명령어

[Katalon] WebUI.verifyElementText() 명령어

킨글 2020. 4. 12. 21:29

페이지에 진입하거나, 특정 Object 클릭 후에 작동이 잘 되었는지 확인하기 위해서는 화면에 표시되는 텍스트를 통해서 확인을 할 수 있겠죠? 그럴 때 사용할 수 있는 것이 verifyElementText()WebUI.verifyElementText() 명령어입니다.

많이 사용되겠죠?

 

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpointfsdf
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.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.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import internal.GlobalVariable as GlobalVariable
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import com.kms.katalon.core.testobject.TestObject as TestObject


'브라우저를 열자마자 daum으로 이동한다.'
WebUI.openBrowser('https://daum.net')
'로딩 대기'
WebUI.delay(1)

'문구 확인'
WebUI.verifyElementText(findTestObject('text_topLabel'), '다음을 시작페이지로')

'브라우저 종료'
WebUI.closeBrowser()

 

도움이 되셨다면 광고 한번씩 클릭 부탁드립니다 😁

Comments