4
4
import com .listeners .TestNGListener_WEB ;
5
5
import com .steps .Hooks ;
6
6
import cucumber .api .Scenario ;
7
+ import io .github .bonigarcia .wdm .WebDriverManager ;
7
8
import io .qameta .allure .Attachment ;
8
9
import net .andreinc .mockneat .MockNeat ;
9
10
import org .apache .commons .io .FileUtils ;
22
23
import java .nio .file .Files ;
23
24
import java .nio .file .Path ;
24
25
import java .nio .file .Paths ;
26
+ import java .text .DecimalFormat ;
25
27
import java .text .SimpleDateFormat ;
26
28
import java .util .Date ;
27
29
import java .util .Locale ;
@@ -40,14 +42,12 @@ public class FrameworkEnvironment {
40
42
protected static Logger logger = LoggerFactory .getLogger (Hooks .class );
41
43
protected static Faker faker = new Faker (new Locale ("en-US" ));
42
44
protected static MockNeat mockNeat = MockNeat .threadLocal ();
45
+ protected static DecimalFormat decimalFormat = new DecimalFormat ("#0.00" );
43
46
44
47
//BUNDLES//
45
48
protected static final ResourceBundle resourceBundleInvalidEmails = ResourceBundle .getBundle ("invalidEmails" );
46
49
protected static final ResourceBundle resourceBundleErrorMessages = ResourceBundle .getBundle ("errorValidators" );
47
50
48
- //DYNAMIC DATA//
49
- protected final String tempEmail = mockNeat .emails ().val ();
50
-
51
51
//STATIC DATA//
52
52
protected static final int TIMEOUT = 15 ;
53
53
protected static final int EXCEL_TC_NAME_COLUMN = 0 ;
@@ -57,7 +57,7 @@ public class FrameworkEnvironment {
57
57
protected static final String ANSI_BLUE = "\u001b [34m" ;
58
58
protected static final String ANSI_GREEN = "\u001B [32m" ;
59
59
protected static final String EXECUTOR = "GRADLE" ;
60
- protected static final String HOME_URL = "http://automationpractice.com/index.php " ;
60
+ protected static final String HOME_URL = "http://automationpractice.com" ;
61
61
protected static final String TODAY_DATE = new SimpleDateFormat ("yyyy-MM-dd HH:ss" ).format (new Date ());
62
62
63
63
//MESSAGES//
@@ -190,7 +190,17 @@ protected void deleteOldLogs() {
190
190
.map (Path ::toFile )
191
191
.forEach (File ::delete );
192
192
} catch (IOException e ) {
193
- logger .error ("Failed to delete logs files!" , e );
193
+ logger .error ("Failed to delete log files!" , e );
194
+ }
195
+ }
196
+
197
+ public void printWebDriverManagerVersions (Boolean boolStatus ) {
198
+ if (boolStatus ) {
199
+ logger .info ("ChromeDriver available versions: " + WebDriverManager .chromedriver ().getVersions () + "\n " );
200
+ logger .info ("GeckoDriver available versions: " + WebDriverManager .firefoxdriver ().getVersions () + "\n " );
201
+ logger .info ("OperaDriver available versions: " + WebDriverManager .operadriver ().getVersions () + "\n " );
202
+ logger .info ("EdgeDriver available versions: " + WebDriverManager .edgedriver ().getVersions () + "\n " );
203
+ logger .info ("IE available versions: " + WebDriverManager .iedriver ().getVersions ());
194
204
}
195
205
}
196
206
}
0 commit comments