-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest1.cy.js
41 lines (26 loc) · 1002 Bytes
/
test1.cy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
it('google search', ()=>{
cy.visit('https://google.com')
cy.get('#L2AGLb > .QS5gu').click()
cy.get('[name="q"]')
.type('youtube')
.type('{enter}')
cy.wait(3000)
cy.contains('YouTube:').click()
})
it('login test', ()=>{
cy.visit('https://opensource-demo.orangehrmlive.com/')
cy.get(':nth-child(2) > .oxd-input-group > :nth-child(2) > .oxd-input').type('Admin')
cy.get(':nth-child(3) > .oxd-input-group > :nth-child(2) > .oxd-input').type('admin123')
cy.get('.oxd-button').click()
cy.contains('Admin').click()
cy.contains('Add').click()
cy.get('.oxd-button--secondary').click()
})
import { LoginFunction } from "../functions/loginFunction"
const loginfunction = new LoginFunction
it('pom login test', ()=> {
loginfunction.navigate('https://trytestingthis.netlify.app/')
loginfunction.enterUsername('test')
loginfunction.enterPassword('test')
loginfunction.clicklogin()
})