Selenium Interaction with Web Browser

Adiya Dua
Updated on 01-Jul-2020 12:13:03

3K+ Views

Selenium is an open source framework used for automation of web applications. Apart from this, it can also work on various administrative tasks such as monitoring of websites.There are 4 flavors of Selenium −Selenium-IDE.Selenium-RC.Selenium Grid.Selenium Web Driver.Let’s have a look at the uses of each of them −Selenium IDE − It is the Integrated Development Environment which has easy to use interface used for building and running Selenium Test Cases. It is a prototyping tool for building test scripts in a way that it records the user actions as they are performed. The recorded actions are stored as a script ... Read More

How Selenium RC Works

Adiya Dua
Updated on 01-Jul-2020 12:11:59

539 Views

Selenium RC or Remote Control is the initial version of Selenium which is also referred to as Selenium1. RC uses a JavaScript Program called Selenium core which controls the browser. It works by intimating the user action as commanded by the JavaScript commands but that does not enforce user to write automated test cases in the only JavaScript, let’s see how does RC make that happen.The above diagram depicts the brief architecture of the Selenium RC.Selenium RC contains the following components −Selenium Server − It acts as the central processor for your entire application. It receives the script for the ... Read More

Read Data from a CSV File in Java

raja
Updated on 01-Jul-2020 12:10:16

24K+ Views

A CSV stands for Comma Separated Values. In a CSV file, each line contains words that are separated with a comma(, ) and it is stored with a .csv extension.We can read a CSV file line by line using the readLine() method of BufferedReader class. Split each line on comma character to get the words of the line into an array. Now we can easily print the contents of the array by iterating over it or by using an appropriate index.CSV FileExampleimport java.io.*; public class CSVReaderTest {    public static final String delimiter = ", ";    public static void read(String csvFile) {   ... Read More

Calculate Average of Numbers in Array using C Programming

sudhir sharma
Updated on 01-Jul-2020 12:08:59

274 Views

There are n number of elements stored in an array and this program calculates the average of those numbers. Using different methods.Input - 1 2 3 4 5 6 7Output - 4Explanation - Sum of elements of array 1+2+3+4+5+6+7=28No of element in array=7Average=28/7=4There are two methodsMethod 1 −IterativeIn this method we will find sum and divide the sum by the total number of elements.Given array arr[] and size of array nInput - 1 2 3 4 5 6 7Output - 4Explanation - Sum of elements of array 1+2+3+4+5+6+7=28No of element in array=7Average=28/7=4Example#include using namespace std; int main() {    int arr[] = { 1, 2, 3, ... Read More

Register BroadcastReceiver Programmatically in Android

Azhar
Updated on 01-Jul-2020 12:06:59

2K+ Views

This example demonstrates how do I register a BroadcastReceiver programtically in android.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.javaimport android.content.IntentFilter; import android.net.ConnectivityManager; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity {    ExampleBroadcastReceiver exampleBroadcastReceiver = new ExampleBroadcastReceiver();    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);    }    protected void onStart(){     ... Read More

Use Snackbar in Android

Azhar
Updated on 01-Jul-2020 11:52:30

918 Views

This example demonstrates how do I use snackBar in android.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 – Open build.gradle(Module app) add the following dependancy -implementation 'com.android.support:design:28.0.0'Step 4 − Add the following code to src/MainActivity.javaimport android.graphics.Color; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);   ... Read More

Find Length of a String in C

sudhir sharma
Updated on 01-Jul-2020 11:38:51

681 Views

The string is actually a one-dimensional array of characters which is terminated by a null character '\0'. Thus a null-terminated string contains the characters that comprise the string followed by a null.To find the length of a string we need to loop and count all words in the loop until the ‘\0’ character is matched.For exampleInput −naman Output − string length is 5Explanation − we need to iterate over each index of the string until reach the end of string means ‘\0’ which is the null character. Example#include #include int main() {    char string1[]={"naman"};    int i=0, length;    while(string1[i] !='\0') ... Read More

Multiply Two Floating Point Numbers in C

sudhir sharma
Updated on 01-Jul-2020 11:36:53

752 Views

Float is a shortened term for "floating-point." By definition, it's a fundamental data type built into the compiler that's used to define numeric values with floating decimal points. A floating-point type variable is a variable that can hold a real number, such as 4320.0, -3.33, or 0.01226. The floating part of the name floating point refers to the fact that the decimal point can “float”; that is, it can support a variable number of digits before and after the decimal point.floating pointCategoryTypeMinimum SizeTypical Sizefloating pointfloat4 bytes4 bytesdouble8 bytes8 byteslong double8 bytes8, 12, or 16 bytesFloating-point rangeSizeRangePrecision4 bytes±1.18 x 10-38 to ... Read More

C Program for Tower of Hanoi

sudhir sharma
Updated on 01-Jul-2020 11:35:25

13K+ Views

The tower of Hanoi is a mathematical puzzle. It consists of three rods and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top. We have to obtain the same stack on the third rod.The objective of the puzzle is to move the entire stack to another rod, obeying the following simple rules−Only one disk can be moved at a time.Each move consists of taking the upper disk from one of the stacks and ... Read More

Print Tutorials Point Without Using a Semicolon in C

sudhir sharma
Updated on 01-Jul-2020 11:29:03

268 Views

To print any string without using a semicolon we need to find how the standard output work and why is semicolon used.The semicolon is a end of line statement that is used to tell the program that the line is ended here. The standard print statement printf used here is a method of the standard io library. Let's dig deep into the printf() method.int printf(const char *format , ...)This method returns an integer and has a set of arguments format and … . The format is a string that is printed in the output screen. And the … is the ... Read More

Advertisements