6
6
7
7
namespace Magento \FunctionalTestingFramework \Module ;
8
8
9
- use Codeception \Events ;
10
9
use Codeception \Module \WebDriver ;
11
10
use Codeception \Test \Descriptor ;
12
11
use Codeception \TestInterface ;
13
- use Facebook \WebDriver \WebDriverSelect ;
14
- use Facebook \WebDriver \WebDriverBy ;
15
- use Facebook \WebDriver \Exception \NoSuchElementException ;
16
12
use Facebook \WebDriver \Interactions \WebDriverActions ;
17
- use Codeception \Exception \ElementNotFound ;
18
13
use Codeception \Exception \ModuleConfigException ;
19
14
use Codeception \Exception \ModuleException ;
20
15
use Codeception \Util \Uri ;
21
- use Codeception \ Util \ ActionSequence ;
16
+ use Magento \ FunctionalTestingFramework \ DataGenerator \ Handlers \ CredentialStore ;
22
17
use Magento \FunctionalTestingFramework \DataGenerator \Persist \Curl \WebapiExecutor ;
23
18
use Magento \FunctionalTestingFramework \Util \Protocol \CurlTransport ;
24
19
use Magento \FunctionalTestingFramework \Util \Protocol \CurlInterface ;
25
- use Magento \Setup \Exception ;
26
20
use Magento \FunctionalTestingFramework \Util \ConfigSanitizerUtil ;
27
- use Yandex \Allure \Adapter \Event \TestCaseFinishedEvent ;
28
21
use Yandex \Allure \Adapter \Support \AttachmentSupport ;
29
22
30
23
/**
44
37
* password: admin_password
45
38
* browser: chrome
46
39
* ```
40
+ *
41
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
47
42
*/
48
43
class MagentoWebDriver extends WebDriver
49
44
{
@@ -61,6 +56,8 @@ class MagentoWebDriver extends WebDriver
61
56
'//div[@data-role="spinner"] '
62
57
];
63
58
59
+ const STEP_OBJ_BACKTRACE_POS = 2 ;
60
+
64
61
/**
65
62
* The module required fields, to be set in the suite .yml configuration file.
66
63
*
@@ -596,6 +593,19 @@ public function dragAndDrop($source, $target, $xOffset = null, $yOffset = null)
596
593
}
597
594
}
598
595
596
+ /**
597
+ * @param $field
598
+ * @param $value
599
+ */
600
+ public function fillSecretField ($ field , $ value )
601
+ {
602
+ // to protect any secrets from being printed to console the values are executed only at the webdriver level as a
603
+ // decrypted value
604
+
605
+ $ decryptedValue = CredentialStore::getInstance ()->decryptSecretValue ($ value );
606
+ $ this ->fillField ($ field , $ decryptedValue );
607
+ }
608
+
599
609
/**
600
610
* Override for _failed method in Codeception method. Adds png and html attachments to allure report
601
611
* following parent execution of test failure processing.
0 commit comments