Techniques to test your web page using Node js selenium web driver.

await driver.get(‘');

await driver.wait(until.elementLocated(By.xpath(“//input[@placeholder=’’]”),2000));

Note: 2000 is milliseconds it can wait for max.

await element.sendKeys(‘my name);

let e3 = await driver.findElement(By.xpath(“//div[@data-testid=’login’]”));


await driver.wait(until.elementLocated(By.xpath(“//*[text()=’POS’]”),120000));

await driver.wait(until.elementLocated(By.xpath(“//*[text()=’Coke’]”),120000));

const delay = ms => new Promise(res => setTimeout(res, ms))
await delay(5000);

let totalDue = await driver.findElement(By.xpath(“//div[contains(text(),’Total Due’)]”));

let totalDue = await driver.findElement(By.xpath(“//div[contains(text(),’Total Due’)]/following-sibling::div”));

Note: Here I’m locating an element with text Total Due and then going to the next element which is it’s sibling div element.

Below document will help in tracing other elements if you can find one element.

Why, How, What, Where!



At TILL, we use a combination of NoSQL and relational databases depending on our use-cases.

In this article, let’s talk about NoSQL.


The optional chaining operator (?.) permits reading the value of a property located deep within a chain of connected objects without having to expressly validate that each reference in the chain is valid.

Note: The ?. operator functions similarly to the . chaining operator, except that instead of causing an error if a reference is nullish (null or undefined), the expression short-circuits with a return value of undefined. When used with function calls, it returns undefined if the given function does not exist.

This results in shorter and simpler expressions when accessing chained properties when the possibility exists that a reference may be missing. It can also be helpful while exploring the content of an object when there’s no known guarantee as to which properties are required.

Problem domain: Analytics

You define jobs in AWS Glue to accomplish the work that’s required to extract, transform, and load (ETL) data from a data source to a data target. You typically perform the following actions:

  • For data store sources, you define a crawler to populate your AWS Glue Data Catalog with metadata table definitions. You point your crawler at a data store, and the crawler creates table definitions in the Data Catalog. For streaming sources, you manually define Data Catalog tables and specify data stream properties.
  • In addition to table definitions, the AWS Glue Data Catalog contains other metadata…

Problem domain:
Asynchronous Communication in Microservice World

What does it offer?
Event ingestion from many sources(AWS services or Third party)
Event delivery (
Targets can be AWS service or Third party)
Event security
Event access Authorization
Event consumption Error handling

Connect data from SaaS apps
EventBridge ingests data from supported SaaS applications and routes it to AWS service targets through native integration in the AWS management console.

Write less code
EventBridge makes it easy to connect applications together because you can ingest, filter and deliver events without writing custom code.

Easily build event-driven architectures

With EventBridge, your event targets don’t…

Some basic concepts:

a) How to represent time in an universal format?
Answer: As a number
Ex: 1606982441

In Nodejs,

let dateNow =;
console.log(dateNow) //1606984719575

So dateNow is a number and is in Unix Epoch.

b) How to convert time in number to specific date and time according to timezone?

let date = new Date(dateNow)
let temp = date.toLocaleDateString(undefined, {timeZone:’Asia/Kolkata’});
console.log(temp) // 3/12/2020

In Windows, the output will be 3/12/2020 i.e dd-mm-yyyy
In Linux, the…

  • A producer is a user application that sends messages.
  • A queue is a buffer that stores messages.
  • A consumer is a user application that receives messages.



Very good blog to read about the life cycle of messages in SQS,a%20large%20number%20of%20messages.&text=There%20is%20no%20concept%20of,visibility%20timeout%20provided%20by%20SQS.

Important points:

  1. Delivery of Messages can be delayed
  2. Messages have an expiry
  3. Dead letter queues if unable to process a message. Unable to process is identified by number of retries to read a message.
  4. Once a message is being read by a consumer, this message shouldn’t be processed by another service at the same time. So when a message is being read, you can configure SQS so that same message wont be read by multiple consumers. This concept is called as Visibility Timeout.

It is an open OASIS and ISO standard lightweight, publish-subscribe network protocol that transports messages between devices.

Historically, the “MQ” in “MQTT” came from the IBM MQ.

Just like HTTP has a client and server, the MQTT protocol defines two types of network entities: a message broker and a number of clients. An MQTT broker is a server that receives all messages from the clients and then routes the messages to the appropriate destination clients. …

I have been trying to follow the below medium link to create PDF from html and I came to know some problems and solutions.


  1. My CSS were not getting applied on the generated PDF
  2. Also I want to know whether my page has been loaded before I do the conversion.
  3. I want to get all console.log messages to see if my page has any errors.
  1. Use printBackground: true option in pdf generation api call.
  2. Use Inline CSS in html document.
  3. Use events on page to get console logs and loading status.

Code snippet:

const templateFile = fs.readFileSync(resumeTemplatePath, ‘utf8’);


Arun Rajeevan

Suffering from Knowledge Quest

Get the Medium app
