Gitlab@Informatics

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

Login Fail

parent 3a469cab
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_Password incorrect</name>
<tag></tag>
<elementGuidId>3a77d6ee-777d-4185-b064-67e2ca8bc82b</elementGuidId>
<selectorCollection>
<entry>
<key>CSS</key>
<value>div.alert.alert-danger.text-center</value>
</entry>
<entry>
<key>XPATH</key>
<value>//div[@id='page-wrapper']/div/div/div/div/div/form/div[4]</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>
รหัสผ่านไม่ถูกต้อง
Password incorrect!
</value>
</webElementProperties>
<webElementProperties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath</name>
<type>Main</type>
<value>id(&quot;page-wrapper&quot;)/div[@class=&quot;row&quot;]/div[@class=&quot;col-lg-12&quot;]/div[1]/div[@class=&quot;card&quot;]/div[@class=&quot;card-body&quot;]/form[1]/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>//div[@id='page-wrapper']/div/div/div/div/div/form/div[4]</value>
</webElementXpaths>
<webElementXpaths>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath:neighbor</name>
<type>Main</type>
<value>(.//*[normalize-space(text()) and normalize-space(.)='ลืมรหัสผ่าน / reset password'])[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(.)='เข้าสู่ระบบ / Sign in'])[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(.)='© 2018 COMPUTER CENTER BURAPHA UNIVERSITY ALL RIGHTS RESERVED.'])[1]/preceding::div[7]</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>//div[4]</value>
</webElementXpaths>
<webElementXpaths>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>xpath:customAttributes</name>
<type>Main</type>
<value>//div[(text() = '
รหัสผ่านไม่ถูกต้อง
Password incorrect!
' or . = '
รหัสผ่านไม่ถูกต้อง
Password incorrect!
')]</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'), 'XK3NS8u8ritBaKfPqIQyHw==')
WebUI.click(findTestObject('Object Repository/Page_My ID/button_Sign in'))
WebUI.click(findTestObject('Object Repository/Page_My ID/div_Password incorrect'))
acturalUrl = WebUI.getUrl()
expectedUrl = 'https://myid.buu.ac.th/signin/1'
Assert.assertEquals(expectedUrl, acturalUrl)
WebUI.closeBrowser()
<?xml version="1.0" encoding="UTF-8"?>
<TestCaseEntity>
<description></description>
<name>Login Fail</name>
<tag></tag>
<comment></comment>
<testCaseGuid>83ae77eb-4406-40cb-a839-73383cec4097</testCaseGuid>
</TestCaseEntity>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment