@@ -29,7 +29,7 @@ async function clickMarkAttendance(driver) {
29
29
// Click the mark attendance button
30
30
logger . info ( "Clicking the mark attendance button." ) ;
31
31
32
- await click ( driver , By . xpath ( '//p[text()="Turnos y marcas"]/..//button ' ) ) ; // Click the mark attendance button
32
+ await click ( driver , By . xpath ( '//button[@data-cy="pdt-mark-attendance"] ' ) ) ; // Click the mark attendance button
33
33
34
34
logger . info ( "Mark attendance button clicked successfully." ) ;
35
35
}
@@ -48,12 +48,12 @@ async function clickMarkTypeSelector(driver, markType) {
48
48
// Click the mark type selector and select the specified mark type
49
49
logger . info ( `Entering the mark type "${ markType } ".` ) ;
50
50
51
- await click ( driver , By . xpath ( '//div[text() ="Marca"]/.. ' ) ) ; // Click the mark type selector
51
+ await click ( driver , By . xpath ( '//input[@placeholder ="Marca"]' ) ) ; // Click the mark type selector
52
52
53
53
if ( markType === "In" ) {
54
- await click ( driver , By . xpath ( '//div [text()="Entrada"]' ) ) ; // Select the "In" mark type
54
+ await click ( driver , By . xpath ( '//span [text()="Entrada"]' ) ) ; // Select the "In" mark type
55
55
} else if ( markType === "Out" ) {
56
- await click ( driver , By . xpath ( '//div [text()="Salida"]' ) ) ; // Select the "Out" mark type
56
+ await click ( driver , By . xpath ( '//span [text()="Salida"]' ) ) ; // Select the "Out" mark type
57
57
}
58
58
59
59
logger . info ( `Mark type "${ markType } " entered successfully.` ) ;
@@ -70,7 +70,7 @@ async function finishMarkAttendance(driver) {
70
70
// Click the finish mark button
71
71
logger . info ( "Clicking the finish mark button." ) ;
72
72
73
- await click ( driver , By . xpath ( '//span[text()="Marcar"]/../../.. ' ) ) ; // Click the finish mark button
73
+ await click ( driver , By . xpath ( '//button[@data-cy="pdt-mark-confirmMarkAttendance"] ' ) ) ; // Click the finish mark button
74
74
75
75
logger . info ( "Finish mark button clicked successfully." ) ;
76
76
}
0 commit comments