Where we learn technology

Month: January 2019

What are the Challenges you faced in Selenium?

Selenium Interview questions- What are the Challenges you faced in Selenium? Selenium Interview Question for Fresher and Experienced


Challenges faced using selenium automation testing, and how to solve them
1. Image or text overlapping issue

2. No facility to deal with Captcha, Bar Code

3. Doesn’t support any non web based (Like Win 32, Java Applet, Java Swing, .Net Client Server etc) applications

4. When you compare selenium with QTP, Silk Test, Test Partner and RFT, there are many challenges in terms of maintainability of the test cases

5. Since Selenium is a freeware tool, there is no direct support if one is in trouble with the support of applications

6. Bitmap comparison is not supported by Selenium

7. Any reporting related capabilities, you need to depend on third party tools

8. You need to learn any one of the native language like (.Net, Java, Perl, Python, PHP, Ruby) to work efficiently

9. Difficult to identify dynamic objects

10. Working with frames

11. Selenium test playback is slow (IDE)

12. JavaScript sandbox, Flash, Applets, Silverlight, and HTML 5’s Canvas all present problems in Selenium

13. Dealing with pop-up windows: Selenium can sometimes fail to record common popups in web apps. The Alert interface brings with it the following commands: void dismiss(), void accept (), getText(), void sendKeys(String stringToSend). The first two basically click on the “cancel” and “OK” buttons respectively on a popup window.

14. Timeout resulting from synchronization problems: One should ideally use selenium.IsElementPresent(locator) to verify that the object is in a loop with Thread.Sleep

15. Testing Flash apps: To automate flash apps with Selenium, one can use Flex Monkium. The application source code must be compiled with the swc files generated by Flex Monkium. Then the app and the Selenium IDE are connected, and the tests can be recorded with IDE.

16. Unexpected error launching Internet Explorer. Browser zoom level should be set to 100% by default for the IE browser to overcome this error

17. Protected Mode must be set to the same valueerror occurs when trying to run Selenium WebDriver on a fresh Windows machine. This issue can be fixed by using capabilities when launching IE

18. Cross Browser Testing Issues

19. Ajax Components

How to find Armstrong Number

How to find Armstrong Number

Learn:
1. check the given number is Armstrong or not.
2. write different test cases for Armstrong Number

Code:

package Questions;
public class ArmstrongNumber {
//153
//1*1*1 = 1
//5*5*5 = 125
//3*3*3 = 27
//1+125+27 = 153
//407 == 4*4*4 + 0 + 7*7*7 = 407
//0
//1 == 1*1*1 = 1
//370, 371
public static void isArmstrongNumber(int num){
//153 ==  1*1*1    5*5*5      3*3*3
System.out.println(“given number is “+ num );
int cube = 0;
int r;
int t;
t=num;
while(num>0){
r = num%10; 
num = num/10;
cube = cube+(r*r*r);
}
if(t==cube){
System.out.println(“this is an armstrong number”);
}else{
System.out.println(“this is not an armstrong number”);
}
}
public static void main(String[] args) {
isArmstrongNumber(153);
isArmstrongNumber(370);
isArmstrongNumber(0);
isArmstrongNumber(1);
isArmstrongNumber(455);
}
}

How to check Palindrome Number

How to check Palindrome Number


Learn:
1. check the given number is Palindrome or not.
2. write different test cases



Code:


package Questions;
public class PalindromeNumber {
//151 454 34543 161 78987  
//teet
public static void isPalindromeNumber(int num){
System.out.println(“Given Number is :” + num);
int r=0;
int sum=0;
int t;
t=num;
while(num>0){
r = num%10; //get the remainder
sum = (sum*10)+r;
num=num/10;
}
if(t==sum){
System.out.println(“palindrome number”);
}else{
System.out.println(“not palindrome number”);
}
}
public static void main(String[] args) {
isPalindromeNumber(151);
isPalindromeNumber(152);
isPalindromeNumber(78987);
isPalindromeNumber(1110);
isPalindromeNumber(0);
}
}

How to find Prime Number

How to find Prime Number in Java

Learn:
1. check the given number is prime or not.
2. print all the prime numbers upto a given a number
3. write different test cases

Code:

package Questions;
public class PrimeNumber {
//2 is the lowest prime number
//3
//num = 20
public static boolean isPrimeNumber(int num){
//edge/corner cases:
if(num<=1){
return false;
}
for(int i=2; i<num; i++){
if(num % i == 0){
return false;
}
}
return true;
}
public static void getPrimeNumbers(int num){
for(int i=2; i<=num; i++){
if(isPrimeNumber(i))
System.out.print(i + ” “);
}
}
public static void main(String[] args) {
System.out.println(“2 is prime number: “+ isPrimeNumber(2));
System.out.println(“3 is prime number: “+ isPrimeNumber(2));
System.out.println(“10 is prime number: “+ isPrimeNumber(10));
System.out.println(“17 is prime number: “+ isPrimeNumber(17));
System.out.println(“0 is prime number: “+ isPrimeNumber(0));
System.out.println(“1 is prime number: “+ isPrimeNumber(0));
System.out.println(“-3 is prime number: “+ isPrimeNumber(-3));
getPrimeNumbers(7);
getPrimeNumbers(13);
getPrimeNumbers(20);
}
}

How to record Selenium Test Execution Video

In this video, we will learn about recording of your test cases execution using Monte Screen Recorder API.

-How to record Selenium Test Execution Video.

This utility can be used to create AVI/Mp4 recording files for your test case execution, which can be shared to developers while logging the bugs.

Here is the GIT Repo:
https://github.com/naveenanimation20/ScreenRecorder

Here is the Monte Maven Dependency:
https://mvnrepository.com/artifact/com.github.stephenc.monte/monte-screen-recorder/0.7.7.0

~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
https://www.youtube.com/c/Naveen%20AutomationLabs?sub_confirmation=1

Follow me on my Facebook Page:
https://www.facebook.com/groups/naveenqtpexpert/

Let’s join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
https://t.me/joinchat/COJqZUPB02rRd8wQsIQ9Cw

WebServices API Automation Tutorials:
https://vimeo.com/ondemand/webservicesapiautomation