The architecture of Selenium webdriver are illustrated below −Image source:https://www.tutorialspoint.com/what−is−web−driver−in−seleniumSelenium webdriver has the following units −Selenium Binding Languages − Selenium can work on various libraries like Java, Python, Ruby, and so on. It has the language bindings for more than one language.JSON Wire Protocol − JSON is Javascript Object Notion. It is used for transferring data from the server to the client on the web page. It is based on the Rest API that transmits information among HTTP servers.Browser Driver − All the browsers have a specific browser driver. They interact with the browsers (hiding the logic of browser functionality). ... Read More
The webdriver in Selenium is an automation framework used to carry out testing in the web in multiple browsers. It can support more than one operating system as well. It comes with no cost.Selenium can used with languages like −JavaPythonC#Ruby.NetPHPSelenium webdriver can be used HTMLUnit browsers which are headless in nature. Thus the execution can happen in invisible mode without a GUI. The headless execution is preferred as it consumes less resources.Selenium can be used with browsers like −ChromeFirefoxSafariIEHeadless modeEdgeThe structure of webdriver is illustrated below −As a test script is executed, a HTTP request is generated for every command ... Read More
We can download Selenium RC by downloading the Java jar file − selenium−server−standalone.jar. We have to download and extract the zip file to do the actual installation.Using the Java Client Driver, the installation can be done by the below steps −To run the Selenium RC server, Java should be installed properly and the path of the environment variable correctly set. To check if Java is installed run the command −java −versionNavigate to the link: https://www.selenium.dev/downloads/ and download the Selenium java client driver zip file.Then the selenium−java jar file is to be extracted.Open an IDE say, Eclipse.Create a Java project.Associate the ... Read More
This example demonstrates how to parse JSON Objects on Android using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Create a new asset folder and create a user_list.json file and the code mentioned below.{ "users":[ { "name":"Niyaz", "email":"testemail1@gmail.com", "contact":{ "mobile":"+91 0000000000" } ... Read More
This example demonstrates how to handle right-to-left and left-to-right swipe gestures on Android using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.os.Bundle import android.view.GestureDetector import android.view.MotionEvent import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import kotlin.math.abs class MainActivity : AppCompatActivity(), GestureDetector.OnGestureListener { lateinit var gestureDetector: GestureDetector private val swipeThreshold = 100 private val swipeVelocityThreshold = 100 override fun onCreate(savedInstanceState: ... Read More
This example demonstrates how to check if an Android application is running in the background using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.app.ActivityManager import android.app.ActivityManager.RunningAppProcessInfo import android.os.Bundle import android.widget.Toast import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { var appRunningBackground: Boolean = false override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) ... Read More
This example demonstrates how to start new activity on click button on Android using KotlinStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.Button class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val button: Button = findViewById(R.id.button) button.setOnClickListener ... Read More
This example demonstrates how to pass data between activities using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.content.Intent import android.os.Bundle import android.text.TextUtils import android.widget.Button import android.widget.EditText import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import java.io.Serializable class MainActivity : AppCompatActivity() { lateinit var etName: EditText lateinit var etPhone: EditText override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... Read More
This example demonstrates how to create a custom Progress Bar in Android using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.ProgressBar class MainActivity : AppCompatActivity() { lateinit var progressBar:ProgressBar override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" progressBar = ... Read More
This example demonstrates how to make an Android Spinner with initial default text using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.ktimport android.os.Bundle import android.view.View import android.widget.AdapterView import android.widget.AdapterView.OnItemSelectedListener import android.widget.ArrayAdapter import android.widget.Spinner import android.widget.Toast import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { lateinit var spinner: Spinner override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP