Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit eab87889 authored by 62160299's avatar 62160299
Browse files

Change pass fail 3

parent b3755d62
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<WebElementEntity>
<description></description>
<name>div_Not found number in your new password</name>
<tag></tag>
<elementGuidId>bd4d2795-8a60-449f-9245-05ea2ef7a905</elementGuidId>
<selectorCollection>
<entry>
<key>CSS</key>
<value>div.alert.alert-danger.text-center</value>
</entry>
<entry>
<key>XPATH</key>
<value>//small[@id='alert-js']/div</value>
</entry>
</selectorCollection>
<selectorMethod>XPATH</selectorMethod>
<useRalativeImagePath>true</useRalativeImagePath>
<webElementProperties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>tag</name>
<type>Main</type>
<value>div</value>
</webElementProperties>
<webElementProperties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>class</name>
<type>Main</type>
<value>alert alert-danger text-center</value>
</webElementProperties>
<webElementProperties>
<isSelected>true</isSelected>
<matchCondition>equals</matchCondition>
<name>text</name>
<type>Main</type>
<value>ไม่พบตัวเลข ในรหัสผ่านใหม่ของท่านNot found number in your new password</value>
</webElementProperties>
<webElementProperties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath</name>
<type>Main</type>
<value>id(&quot;alert-js&quot;)/div[@class=&quot;alert alert-danger text-center&quot;]</value>
</webElementProperties>
<webElementXpaths>
<isSelected>true</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath:idRelative</name>
<type>Main</type>
<value>//small[@id='alert-js']/div</value>
</webElementXpaths>
<webElementXpaths>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath:neighbor</name>
<type>Main</type>
<value>(.//*[normalize-space(text()) and normalize-space(.)='number'])[1]/following::div[1]</value>
</webElementXpaths>
<webElementXpaths>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath:neighbor</name>
<type>Main</type>
<value>(.//*[normalize-space(text()) and normalize-space(.)='symbol'])[1]/following::div[1]</value>
</webElementXpaths>
<webElementXpaths>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath:neighbor</name>
<type>Main</type>
<value>(.//*[normalize-space(text()) and normalize-space(.)='Change Password'])[1]/preceding::div[1]</value>
</webElementXpaths>
<webElementXpaths>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath:neighbor</name>
<type>Main</type>
<value>(.//*[normalize-space(text()) and normalize-space(.)='© 2018 COMPUTER CENTER BURAPHA UNIVERSITY ALL RIGHTS RESERVED.'])[1]/preceding::div[9]</value>
</webElementXpaths>
<webElementXpaths>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath:neighbor</name>
<type>Main</type>
<value>//*/text()[normalize-space(.)='ไม่พบตัวเลข ในรหัสผ่านใหม่ของท่าน']/parent::*</value>
</webElementXpaths>
<webElementXpaths>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath:position</name>
<type>Main</type>
<value>//small/div</value>
</webElementXpaths>
<webElementXpaths>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath:customAttributes</name>
<type>Main</type>
<value>//div[(text() = 'ไม่พบตัวเลข ในรหัสผ่านใหม่ของท่านNot found number in your new password' or . = 'ไม่พบตัวเลข ในรหัสผ่านใหม่ของท่านNot found number in your new password')]</value>
</webElementXpaths>
</WebElementEntity>
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 static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
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.testdata.TestData as TestData
import com.kms.katalon.core.testng.keyword.TestNGBuiltinKeywords as TestNGKW
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable
import org.junit.Assert
import org.openqa.selenium.Keys as Keys
WebUI.openBrowser('')
WebUI.navigateToUrl('https://myid.buu.ac.th/')
WebUI.setText(findTestObject('Object Repository/Page_My ID/input_(Username)_user'), '62160299')
WebUI.setEncryptedText(findTestObject('Object Repository/Page_My ID/input_(Password)_pass'), 'GwWY4dc3lpOeU9zC0JPIpw==')
WebUI.click(findTestObject('Object Repository/Page_My ID/button_Sign in'))
WebUI.click(findTestObject('Object Repository/Page_My ID/a_Change PasswordRenew password'))
WebUI.setEncryptedText(findTestObject('Object Repository/Page_My ID/input_(New Password)_newpass'), 'ecCRzUxU9HjdN8UwUTlBbA==')
WebUI.setEncryptedText(findTestObject('Object Repository/Page_My ID/input_(Re-New Password)_renewpass'), 'ecCRzUxU9HjdN8UwUTlBbA==')
WebUI.click(findTestObject('Object Repository/Page_My ID/button_Change Password'))
actualResult = WebUI.getText(findTestObject('Object Repository/Page_My ID/div_Not found number in your new password'))
expectedResult = 'ไม่พบตัวเลข ในรหัสผ่านใหม่ของท่าน\nNot found number in your new password'
Assert.assertEquals(expectedResult, actualResult)
WebUI.closeBrowser()
<?xml version="1.0" encoding="UTF-8"?>
<TestCaseEntity>
<description></description>
<name>Change Password Fail3</name>
<tag></tag>
<comment></comment>
<testCaseGuid>62aa92a7-e159-442a-89b3-72b60df2e07a</testCaseGuid>
</TestCaseEntity>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment