• Slider Banner

    Prepare for

    Technical Interview

    Over .1 Million+ Interview Questions for different profiles

    Read More
  • Slider Banner

    Join the

    Programming World

    Learn about top programming languages, tools and frameworks.

    Read More
  • Slider Banner

    Prepare with

    Certification MCQ

    Practice for certification from 1000+ multiple choice questions.

    Read More

While using click command in Selenium can you use screen coordinate?

To click on specific part of element, you would need to use clickAT command.  ClickAt command accepts element locator and x, y co-ordinates as arguments - clickAt (locator, cordString).

DefaultSelenium.ClickAt Method

It clicks on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.

What is the difference between type keys and type commands in Selenium?

TypeKeys() will trigger JavaScript event in most of the cases whereas .type() won't. Type key populates the value attribute using JavaScript whereas .typekeys() emulates like actual user typing.

DefaultSeleniumTypeKeys Method  

Simulates keystroke events on the specified element, as though you typed the value key-by-key.

This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string; this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.

Unlike the simple "type" command, which forces the specified value into the page directly, this command may or may not have any visible effect, even in cases where typing keys would normally have a visible effect. For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in the field.

In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to send the keystroke events corresponding to what you just typed.

How will you find an element using Selenium?

In Selenium every object or control in a web page is referred as an elements, there are different locators to find an element in a web page they are:

  • ID
  • Name
  • Tag
  • Attribute
  • CSS
  • Linktext
  • PartialLink Text
  • Xpath etc

You can use findElement() to find single element and findElements() method to find multiple elements in Selenium.

Mention what is Selenium 3.0?

Selenium 3.0 is the latest version of Selenium. Here are few new features added to Selenium 3.0:

  • Minimum Java version is now 8+
  • It will support for Firefox Via Mozilla’s geckodriver
  • Support for Edge is provided by MS
  • It now supports Safari on MacOS via Apple's own Safari driver

What will be the output of below Java code?

Example Code: 

public class Test
{
    public static void main(String [] args)
    {
        dm();
    }
    
    public static void dm()
    {
        dm1();
        System.out.println(10/0);
	}

    public static void dm1()
    {
        System.out.println(" Vinay");
    }
}

Output: Vinay Exception in thread "main" java.lang.ArithmeticException: / by zero

Why Instagram is important in Social Media Marketing and How it can help Your Business?

Instagram is Video and Photo sharing Social Networking platform with various filters, and organized with tags and location information.
People come to Instagram to be inspired and discover things they care about and include content from brands and business.Users can browse other users' content by tags and locations, and view trending content. 

Instagram has over 500 million active monthly users. And instagram users have shared over 40 billion photos till date and share an average of 95 million photos and videos per day. So it can surely help to grow your business and to convert leads in to paid clients.

1 Million+ advertisers use Instagram worldwide to share their stories and drive business results. Also 75% of instagrammers take action after being inspired by a post. And 1/3rd of the most viewed stories are from businesses. 
Outstanding ads that will invite your audience and convince them to take action for buying your product and services. Entrepreneurs and Most of the big companies use Instagram to promote their products and to establish a relationship with user day by day. 60% of people say they discover new products on Instagram. That's why instagram helps to grow business.

What are the browsers supported by Protractor?

Protractor supports the two latest major versions of Chrome, Firefox, Safari, and IE. These are used in Protractor's own suite of tests. You can view the current status on Travis.

Note that because Protractor uses WebDriver to drive browsers, any issues with WebDriver implementations (such as FireFoxDriver, ChromeDriver, and IEDriver) will show up in Protractor. The chart below links to major known issues. You can search through all WebDriver issues at the Selenium issue tracker.

Driver Support
ChromeDriver Yes
FirefoxDriver* Yes
SafariDriver Yes
IEDriver Yes
OperaDriver No
ios-Driver No
Appium - iOS/Safari Yes**
Appium - Android/Chrome Yes**
Selendroid Yes**
PhantomJS / GhostDriver *

(*) WebDriver support fr Firefox has changed recently, and FireFox version 48 does not work properly with the current tools. For the moment, we recommend testing against FireFox 47. In future releases, support for WebDriver via Mozilla's Marionette project will be available.

(**) These drivers are not yet in the Protractor smoke tests.

(*) We recommend against using PhantomJS for tests with Protractor. There are many reported issues with PhantomJS crashing and behaving differently from real browsers.

How do you find Angular on your page?

Open chrome devtools or firefox and find if "angular" is defined. For AngularJS apps, the "angular" variable is expected to be available in the global context.

Note: Check your version of Angular is upgraded – Protractor supports Angular and AngularJS 1.0.6/1.1.4 and higher.

Subscribe to