Passed
Pull Request — master (#4)
by Cesar
02:54
created

ConfirmData   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 1
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