diff --git a/Object Repository/Page_My ID/div_Not found number in your new password.rs b/Object Repository/Page_My ID/div_Not found number in your new password.rs new file mode 100644 index 0000000000000000000000000000000000000000..6421f631217cdb83a5ffd051ed104a38ea3500e1 --- /dev/null +++ b/Object Repository/Page_My ID/div_Not found number in your new password.rs @@ -0,0 +1,103 @@ +<?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("alert-js")/div[@class="alert alert-danger text-center"]</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> diff --git a/Scripts/Change Password Fail3/Script1647004617080.groovy b/Scripts/Change Password Fail3/Script1647004617080.groovy new file mode 100644 index 0000000000000000000000000000000000000000..b0f33feccec43663a2e9eb2eb61a79aadd2f16ce --- /dev/null +++ b/Scripts/Change Password Fail3/Script1647004617080.groovy @@ -0,0 +1,47 @@ +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() + diff --git a/Test Cases/Change Password Fail3.tc b/Test Cases/Change Password Fail3.tc new file mode 100644 index 0000000000000000000000000000000000000000..5581cea1756baa2a07192bf68439eda5c01c72e2 --- /dev/null +++ b/Test Cases/Change Password Fail3.tc @@ -0,0 +1,8 @@ +<?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>