froth-webdriverio-framework 1.0.99 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  const { Pool } = require('pg');
2
2
 
3
3
  // Function to establish connection to MySQL database
4
- async function connectToPostgreSQL(hostname, username, password, dbname, portnumber) {
4
+ async function connectToPostgreSQL(hostname, username, password1, dbname, portnumber) {
5
5
  try {
6
6
  console.log('Connecting to the PostgreSQL database...');
7
7
 
8
8
  const poolConfig = {
9
9
  host: hostname,
10
10
  user: username,
11
- password: password,
11
+ password: password1,
12
12
  database: dbname,
13
13
  port: 5432 // Increased connection timeout
14
14
  };
@@ -22,7 +22,7 @@ async function connectToPostgreSQL(hostname, username, password, dbname, portnum
22
22
 
23
23
  const pool = new Pool(poolConfig);
24
24
  // const client = await poolConfig.connect();
25
- console.log('PostgreSQL connection pool created.');
25
+ console.log('PostgreSQL connection pool created.'+JSON.stringify(pool));
26
26
  // Optionally, run a simple query to verify the connection
27
27
  // const res = await client.query('SELECT NOW()');
28
28
  // console.log("postgresresults "+res.rows[0]);
@@ -54,6 +54,7 @@ async function fetchDataFromPostgresDB(connectionpool, query) {
54
54
  console.log(JSON.stringify(finalResult, null, 2));
55
55
  } catch (error) {
56
56
  console.error('Error fetching data:', error);
57
+
57
58
  } finally {
58
59
  if (connection) {
59
60
  connection.release();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "1.0.99",
3
+ "version": "2.0.0",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",