Completed
Push — master ( 4e6ecf...24a4d5 )
by Cesar
12s
created

ConfirmData::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Pagantis\SeleniumFormUtils\Step;
4
5
use Facebook\WebDriver\WebDriverBy;
6
7
/**
8
 * Class ConfirmData
9
 *
10
 * @package Pagantis\SeleniumFormUtils\Step
11
 */
12
class ConfirmData extends AbstractStep
13
{
14
    /**
15
     * Handler step
16
     */
17
    const STEP = '/confirm-data';
18
19
    /**
20
     * Pass from confirm-data to next step in Application Form
21
     *
22
     * @throws \Exception
23
     */
24
    public function run()
25
    {
26
        $this->validateStep(self::STEP);
27
        //Click on confirm:
28
        $confirmCheckbox = $this->webDriver->findElement(WebDriverBy::className('Form-checkboxSkin'));
29
        $confirmCheckbox->click();
30
        $formContinue = $this->webDriver->findElement(WebDriverBy::name('form-continue'));
31
        $formContinue->click();
32
    }
33
}
34