How to get Xpath of simple text which is outside the HTML Tags? Reference URL: https://agilehelpdoc.blogspot.in/ Reference Screenshot:
QuestionAnswer
QnA | How to access Login Screen of timesjobs.com which opens in a pop-up window?
How to access Login Screen of timesjobs.com which opens in a pop-up window? URL: http://www.timesjobs.com/ Screen: 1. Navigate to above URL. 2. Click on SIGN IN link present on the top-right corner of the web page.
QnA | Difference between Integer and int keywords.
The basic difference between Integer and int is that Integer is a Class whereas int is a data type. int Data Type We already know that int is a primitive data type. It means that these data types are not further breakable. Any variable declared with int data type can store only numeric values inRead More
QnA | Can main method be overloaded?
Question: Can main method be overloaded? or Can a java program have multiple methods with name “main” keyword? Answer: Yes, the Main method can also be overloaded same as normal method overloading techniques. Method overloading is a sub-process of Polymorphism. To achieve method overloading we have to declare and define multiple methods with the same name butRead More
QnA | How do I reverse a String/Sentence in Java?
Question: Print Hello World as ‘Olleh Dlrow’ using Java. Problem Write a program to reverse a String or we can say that reverses each word in a sentence and also while printing the first letter should be in upper case. Input can contain any number of words as mentioned below: Input String:- Hello Worldask for helpYou Live Only OnceRead More
QnA | Perform Multiplication and Division without * or / or % operators.
Problem: How to write a program that can be used for Multiplication or Division two integer values without using “*” operator and “/” or “%” operators? Example:Inputs:-6 and 3 (Multiply)50 and 10 (Multiply)18 and 2 (Divide)39 and 4 (Divide)Output:-Multiplication of 6 and 3 = 18Multiplication of 50 and 10 = 500Division of 18 and 6:Quotient 3Read More
QnA | How do I get the default value of data type?
There is a simple process to get the default value of data type. Declare data type without any value, try to access it and you will get your answer. Step-1: Declare variables Declare variables without any value and try to print the value of that variable. Step-2: Default value of data type When we tryRead More
QnA | How to split String if it contains period symbol (.) in between?
How to split String if it contains period symbol (.) in between? Problem: I have to write a program which takes file name with any extension as a parameter and it should return the extension of that file.
iFrame || Multiple ways to handle iFrame html tag using selenium.
In our, last post we had learned how to handle iframes on a web page as we can’t access web element present inside an iframe directly. There are multiple ways to handle iframe using selenium. We have to first switch the focus inside the iframe using the switchTo statement onlyRead More
Swapping two variable values without using any third variable.
Swapping of two values: /** * @author ashok.kumar * */ public class Swapping { public static void main(String[] args) { // TODO Auto-generated method stub int x=2; int y=5; System.out.format(“Value of x=%d and y=%d before swapping.\n”,x,y); x=x+y; // x=7 y=x-y; // y=2 x=x-y; // x=5 System.out.format(“Value of x=%d and y=%d after swapping.”,x,y); } } RelatedRead More