Difference Between IP Camera and CCTV Camera

Ginni
Updated on 23-Nov-2021 04:42:42

790 Views

Let us begin by understanding what an IP Camera is.IP CameraIP camera is a network digital camera that need the Internet Protocol (IP) and has its IP address. An IP camera is used when defining video surveillance cameras.An IP camera uses an Ethernet cable and sends a digital signal. This type of camera can be simply networked and can send a signal to a network video recorder (NVR) placed on a local or remote network.IP cameras tend to capture better quality pictures, which is especially beneficial in the case of transferring targets, as frame rates can be adjusted according to ... Read More

Obtain Tag Name of Parent Element in Selenium WebDriver

Debomita Bhattacharjee
Updated on 22-Nov-2021 11:38:56

3K+ Views

We can obtain the tagname of the parent element in Selenium webdriver. First of all, we need to identify the child element with help of any of the locators like id, class, name, xpath, or CSS. Then we have to identify the parent with the findElement(By.xpath()) method.We can identify the parent from the child, by localizing it with the child and then passing (parent::*) as a parameter to the findElement(By.xpath()). Next, to get the tagname of the parent, we have to use the getTagName() method.Syntaxchild.findElement(By.xpath("parent::*"));Let us identify tagname of the parent of child element li in the below html code ... Read More

Obtain Page Title Using Selenium WebDriver

Debomita Bhattacharjee
Updated on 22-Nov-2021 11:34:51

10K+ Views

We can obtain the page title using Selenium webdriver. The method getTitle() is used to obtain the present page title and then we can get the result in the console.Syntaxt = driver.getTitle();Let us find the title of the current page. We shall get About Careers at Tutorials Point – Tutorialspoint as output.ExampleCode Implementation.import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; public class PageTitle{    public static void main(String[] args) {       System.setProperty("webdriver.chrome.driver",       "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe");       //implicit wait       driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);       WebDriver driver = new ChromeDriver(); ... Read More

Interact with Hidden Elements in Selenium WebDriver

Debomita Bhattacharjee
Updated on 22-Nov-2021 11:19:22

15K+ Views

We can interact with hidden elements in Selenium Webdriver. The hidden elements are the ones that are present in the DOM but not visible on the page. Mostly the hidden elements are defined by the CSS property style="display:none;". In case an element is a part of the form tag, it can be hidden by setting the attribute type to the value hidden.Selenium by default cannot handle hidden elements and throws ElementNotVisibleException while working with them. Javascript Executor is used to handle hidden elements on the page. Selenium runs the Javascript commands with the executeScript method. The commands to be run ... Read More

Get Attribute Value of an Element in Selenium WebDriver

Debomita Bhattacharjee
Updated on 22-Nov-2021 11:15:19

8K+ Views

We can get an attribute value of an element in the Selenium Webdriver. This is achieved with the help of the getAttribute method. In an html document, each element is identified with its tagname along with the element attributes with their values. To get an attribute value, we have to pass the element attribute as an argument to the getAttribute method.Let us see the html code of an element and obtain the value of its src attribute. The value of its src attribute shall be /about/images/logo.png.ExampleCode Implementation.import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; public class ... Read More

Upload Files Using Selenium WebDriver

Debomita Bhattacharjee
Updated on 22-Nov-2021 11:00:22

5K+ Views

We can upload files using Selenium Webdriver. This is achieved by the sendKeys method. We have to first identify the element which performs the file selection by mentioning the file path [to be uploaded].This is only applied to an element having a type attribute set to file as a value along with the element tag name as input. The below html code shows the element with type = file value set.ExampleCode Implementation.import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; public class WndsFileUpl{    public static void main(String[] args) {       System.setProperty("webdriver.chrome.driver",       "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe");   ... Read More

Selenium WebDriver with Java Quickstart

Debomita Bhattacharjee
Updated on 22-Nov-2021 10:56:04

836 Views

We can work with Selenium webdriver with Java Quickstart template. This can be done by following the below steps −Step1− Click on the File menu in Eclipse. Then select the option New. Next click on Other.Step2− Click on Maven Project from the Maven folder. Then click on Next.Step3− Proceed with the further steps.Step4− Select maven-archetype-quickstart template. Then click on Next.Step5− Add GroupId as Selenium, Artifact Id as Automation-Selenium, and proceed.Step6− A project should get created with an archetype project structure. The Selenium-related scripts should be written within the src/test/java folder.

Execute JavaScript Using Selenium in Python

Debomita Bhattacharjee
Updated on 22-Nov-2021 10:48:51

24K+ Views

We can run Javascript in Selenium webdriver with Python. The Document Object Model communicates with the elements on the page with the help of Javascript. Selenium executes the Javascript commands by taking the help of the execute_script method. The commands to be executed are passed as arguments to the method.Some operations like scrolling down in a page cannot be performed by Selenium methods directly. This is achieved with the help of the Javascript Executor. The window.scrollTo method is used to perform scrolling operation. The pixels to be scrolled horizontally along the x-axis and pixels to be scrolled vertically along the ... Read More

Run Tests Using a Test Runner File for Cucumber

Debomita Bhattacharjee
Updated on 22-Nov-2021 10:45:09

18K+ Views

We can run tests using a test runner file for Cucumber. The test runner file should contain the path of the feature file and step definition file that we want to execute.Code Implementation of the Feature fileFeature − Login ModuleScenario − Welcome Page Login verificationGiven User is on Welcome PageThen Welcome page should be displayedExampleCode Implementation of step definition filepackage stepDefinations; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; public class stepDefination {    @Given("^User is on Welcome Page$")    public void user_on_welcome_page() {       System.out.println("User on welcome page");    }    @Then("^Welcome page should be displayed$")    public void verify_user_on_welcome_page() {   ... Read More

Auto-Generate Step Definition for Feature File in Cucumber

Debomita Bhattacharjee
Updated on 22-Nov-2021 10:37:29

6K+ Views

We can auto-generate a step definition file to a feature file in Cucumber. This can be done by using the Tidy Gherkin plugin which is available as a Chrome extension.Step1− Navigate to the below link to access the Tidy Gherkin plugin.https://chrome.google.com/webstore/detail/tidygherkin/ nobemmencanophcnicjhfhnjiimegjeo?hl=en-GBStep2− Then click on the Add to Chrome button.Step3− Once done, enter chrome://apps/ in the browser. The Tidy Gherkin plugin should be visible.Step4− Click on it to launch it.Step5− Copy and paste the feature file that we want to map to a step definition file within the edit box that has the Enter your Gherkin here…. Then click on ... Read More

Advertisements