Monday 26 October 2015

package org.junit does not exist

package org.junit does not exist

Your Test class might be located in src/main/java.
Also the value of the "scope" element in the POM for JUnit was "test", although that is how it is supposed to be.
The problem was that You had been sloppy when creating the test class in Eclipse that is
resulting in it being created in src/main/java insted of src/test/java.

So put your .java class in src/test/java


And in pom.xml just add  <scope>test</scope> for junit dependency if it is already existed.


<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>4.11</version>
  <scope>test</scope>
</dependency>

Wednesday 21 October 2015

How to clear passwords in firefox

Some times even though we clear cookies passwords saves in firefox browser because on firefox passwords stores on security tab. to clear those passwords we have to navigate to the below path .

On firefox Click on right corner tab and click on Preferences it navigates to 

about:preferences

 Security-> Saved Passwords

then click on Remove all button

about:preferences


Security-> Saved Passwords

How to test your website for different countries just by setting proxy ip address on browser

If you are test your website for different countries just by sitting in UK if you want to see how your site behaves to USA clients. You can test  by setting proxy in your browser.


 Fox proxy chrome type in google for plug in  and install

 Open browser on right side you see blue icon click on that 
It should open this extension





 click on Options

 Then click on Add new proxy


 Under Proxy details tab


 Enter your country ip address Host or IP Address
 for example USA IP address 69.147.161.182:8080
 Ip address you can get from here

http://www.samair.ru/proxy-by-country/United-States-01.htm


To choose different country ip 

http://www.samair.ru/proxy/


If you want to give name to the proxy whatever you have created 



After that click on SAVE button

Open a browser and click on right side blue icon


Enable to click on your proxy 

Now clear all your cookies and open new tab of browser
Or else you can open site in 

incognito tab 



now search for www.google.com .. It should open .com site since we setup USA proxy ip address .

As a results you can sit in any country for example in UK but if you want to see how your site behaves to USA clients 

ANDROID_HOME not set appium java

Where the Android-SDK is installed depends on how you installed it. If you downloaded the SDK through their website and then dragged/dropped the Application to your Applications folder, it's most likely in /Applications/ADT/sdk (as it is in your case).

If you installed it using Homebrew (brew install android-sdk), then it's located here:

/usr/yourusername/android-sdks



env | grep ANDROID_HOME on the terminal that is working. If the file is already existed This should give something like
ANDROID_HOME=/usr/yourusername/android-sdks


If not they do changes on Bash file

Type below command to check whether bash_profile existed or not
ls -1 ~/.bash_profile
 
If it is not existed then it message throws as “No such file or directory”
touch ~/.bash_profile 


now open .bash_profile, if you dont have one just create one
vi ~/.bash_profile
Add the following:

esc + i   it allow to enter data into vim editor

#set ANDROID_HOME

ANDROID_HOME=/usr/yourusername/android-sdks

export ANDROID_HOME


Once you have this set, you need to add this to the PATH environment variable

export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Now save the file  by pressing below commands esc + :wq  
And after that to execute bash file 
 source ~/.bash_profile
 
 Now if you type this command it should show path
 
 echo $ANDROID_HOME