File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ const { test, expect } = require ( '@playwright/test' ) ;
2+
3+ test ( 'Verify Radio Buttons' , async ( { page } ) => {
4+ // Navigate to the radio buttons page
5+ await page . goto ( 'https://qa-practice.netlify.app/radiobuttons' ) ;
6+
7+ // Locate the Radio Buttons
8+ const radioButton1 = page . locator ( '#radio-button1' ) ;
9+ const radioButton2 = page . locator ( '#radio-button2' ) ;
10+ const radioButton3 = page . locator ( '#radio-button3' ) ;
11+ const radioButton4Disabled = page . locator ( '#radio-button4' ) ;
12+
13+ // Click on Radio Buttons and verify they are selected
14+ await radioButton1 . click ( ) ;
15+ await expect ( radioButton1 ) . toBeChecked ( ) ;
16+
17+ await radioButton2 . click ( ) ;
18+ await expect ( radioButton2 ) . toBeChecked ( ) ;
19+
20+ await radioButton3 . click ( ) ;
21+ await expect ( radioButton3 ) . toBeChecked ( ) ;
22+
23+ // Verify the disabled radio button
24+ await expect ( radioButton4Disabled ) . toBeDisabled ( ) ;
25+ } ) ;
You can’t perform that action at this time.
0 commit comments