First Few Lines
Home
Java
Golang
Links icon
LinkedIn Twitter
About
  • How to select first child element in Selenium java

    May 8, 2021 · 1 min read · Selenium java child  ·
    Share on:

    To select the first children of a given Selenium element, we can simply use the :first-child CSS selector. Here is an example which will find the first child having div tag. 1WebElement childDiv = element.findElement(By.cssSelector("div:first-child")); In case we want to get the list of immediate child …

    Read More
  • Java Selenium web automation example in gradle

    May 8, 2021 · 2 min read · Selenium java gradle  ·
    Share on:

    Selenium WebDriver became a de-facto standard for automating the web based UI testing. It can also be very useful in screen scraping or crawling kind of applications. Here we have a basic example of web UI automation using Selenuium framework. We will use gradle as the build tool. We can simply call it as Hello World …

    Read More
  • Execute native SQL Query in JPA / Spring Boot

    Sep 30, 2020 · 1 min read · Spring Boot JPA Native SQL  ·
    Share on:

    Here is an example code of how to execute native SQL query with some parameters in JPA / Spring Boot. First we need use Spring Boot's EntityManagerFactory bean. We can simply use @Autowired annotation to make this available in our class. Then create new EntityManager session, execute the native SQL and finally close …

    Read More
  • Parse json string using Google Gson

    Sep 30, 2020 · 4 min read · json parse java Google GSon  ·
    Share on:

    Google Gson is very popular library to convert JSON to object and vice versa. The formJson(...) and toJson(...) are the two main APIs for the same. In this example we will see how to perform following JSON parsing operations using those APIs. 1. Convert an object to JSON string 2. Convert a list of objects to JSON …

    Read More
  • Selenium error - element is not clickable at point

    Sep 29, 2020 · 1 min read · Selenium java click moveToElement  ·
    Share on:

    While working with Selenium WebDriver and trying to perform an automated click on that, sometime we encounter the above error. The most common reason behind it is the element is not visible in the screen or visible area. To fix this, we have to first move to that element and perform the click. That means instead of …

    Read More
  • Spring Boot MVC download image or binary file

    Sep 17, 2017 · 2 min read · Spring Boot  ·
    Share on:

    Sometime we want our user to download some file from our web application that is developed in Spring MVC or Spring Boot. To achieve this the main trick is to send the Content-Disposition http header before sending the data. Here is an example of a Controller class with just one method that take the name of a jpg image …

    Read More
  • Spring Boot MVC Controller send image or binary data

    Jul 14, 2017 · 1 min read · Spring Boot  ·
    Share on:

    In web server application, sending image data to client browser is quite common job. This can be easily achieved in Spring or Spring boot MVC Controller. Key things here is to specify proper Content-Type such as image/png or whatever and then return the raw binary data of the image. Here is a sample code to demonstrate …

    Read More
  • Spring Boot + Spring JPA with PostgreSQL or MySQL or Oracle or SQL Server database and Thymeleaf using Gradle

    Jul 2, 2017 · 4 min read · Spring Boot Thymeleaf java Postgres MySQL Oracle  ·
    Share on:

    Here we will see how to build a sample full stack web application using Spring Boot, Spring JPA with database like PostgreSQL, MySQL or Oracle Thymeleaf and Gradle. This example is very similar with my other example regarding Spring boot with H2 database: Spring Boot H2 data source with Thymeleaf using Gradle The …

    Read More
  • Spark Java with Hibernate and MySql database example

    Jun 21, 2017 · 4 min read · String join java  ·
    Share on:

    In practical scenario it is very common to integrate a database with the web service application. Here we will see an example to use Hibernate to store and retrieve data in Spark Java application. We will use MySql database behind the Hibernate. The application provides HTML based UI for entering and viewing data. …

    Read More
  • Spring Boot RESTful web service JSON example

    Jun 12, 2017 · 4 min read · Java Spring Boot REST CRUD JSON  ·
    Share on:

    Spring Boot comes with all the needed components for creating RESTful web services. Here we will see how easily we can build a simple Spring Boot application which will provide web services for CRUD operations i.e. Create, Retrieve, Update and Delete operations using HTTP POST, GET, PUT and DELETE method respectively. …

    Read More
    • ««
    • «
    • 1
    • 2
    • 3
    • »
    • »»

Hansaraj Das

Technologist, student, teacher, continual incremental improvement.
Read More

Featured Posts

  • Java Selenium web automation example in gradle
  • Git frequently used commands
  • Spring Boot H2 datasource with Thymeleaf using Gradle

Recent Posts

  • Configure Windows Server Core for Remote access/management
  • Execute operating system shell command in Go
  • How to select first child element in Selenium java
  • Gradle publish / deploy to Nexus or Artifactory using maven-publish plugin
  • Java Selenium web automation example in gradle
  • Golang - fatal error: sync: RUnlock of unlocked RWMutex
  • Failed to create endpoint on network nat: failed during hnsCallRawResponse: hnsCall failed in Win32
  • Copy files from docker container to host

Categories

JAVA 24 SPRING-BOOT 6 SPARK-JAVA 4 GRADLE 3 DOCKER 2 ERROR 2 GOLANG 2 SELENIUM 2 DATABASE 1 DOWNLOAD 1 GIT 1 HIBERNATE 1 JAVASCRIPT 1 JPA 1
All Categories
DATABASE1 DOCKER2 DOWNLOAD1 ERROR2 GIT1 GOLANG2 GRADLE3 HIBERNATE1 JAVA24 JAVASCRIPT1 JPA1 SELENIUM2 SERVER1 SPARK-JAVA4 SPRING-BOOT6 SQL1
[A~Z][0~9]

Tags

JAVA 21 SPRING-BOOT 8 EXAMPLE 4 FILE 4 GRADLE 4 ERROR 3 JSON 3 SELENIUM 3 SPARK 3 AJAX 2 DOCKER 2 GOLANG 2 JOIN 2 JPA 2
All Tags
ABSTRACT-CLASS1 AJAX2 CHILD1 CLICK1 COMMAND1 COMMANDS1 COMPARABLE1 COMPARATOR1 COMPRESS1 CRUD1 DEBUG1 DEPLOY1 DIALECTS1 DOCKER2 ERROR3 EXAMPLE4 EXTRACT1 FILE4 GIT1 GO1 GOLANG2 GOOGLE-GSON1 GRADLE4 HELLO-WORLD1 HIBERNATE1 HTML1 INDEX1 INFO1 JAVA21 JAVASCRIPT1 JOIN2 JPA2 JQUERY1 JSON3 JSONFORMAT1 JSONSERIALIZE1 MOVETOELEMENT1 MYSQL1 NATIVE1 OPTION1 ORACLE1 PARSE1 POSTGRES1 PUBLISH1 QUERY1 READ1 REMOTE-DESKTOP1 REST1 RUNNABLE1 SELECT1 SELENIUM3 SHELL1 SORT1 SPARK3 SPRING-BOOT8 SQL1 STACKTRACE1 STRING2 TEXT2 THREAD1 THYMELEAF2 TREESET1 UPLOAD1 WINDOWS1 WINDOWS-SERVER-CORE1 WRITE1 ZIP1
[A~Z][0~9]
First Few Lines

Copyright  FIRST FEW LINES. All Rights Reserved