describe('Facebook Register and Post', function() {
it('Visits Facebook and registers', function() {
cy.visit('https://www.facebook.com/')
cy.get('input[name="firstname"]').type('FirstName')
cy.get('input[name="lastname"]').type('LastName')
cy.get('input[name="reg_email__"]').type('email@example.com')
cy.get('input[name="reg_passwd__"]').type('password')
cy.get('select[name="birthday_month"]').select('Jan')
cy.get('select[name="birthday_day"]').select('1')
cy.get('select[name="birthday_year"]').select('2000')
cy.get('input[type="radio"][value="1"]').check()
cy.get('button[name="websubmit"]').click()
})
it('Posts a message', function() {
cy.get('textarea[name="xhpc_message"]').type('Hello, cypress test!')
cy.get('button[data-testid="react-composer-post-button"]').click()
})
})
No comments:
Post a Comment