Tuesday, 30 December 2014

pom.xml does not exist selenium java

pom.xml does not exist selenium java

In your pom.xml you are using modules..  so  you have to include

There must absolutely be a pom.xml file under projectName, and it must have an artifact id that matches the one under the parent declaring the module, i.e.

<artifactId>projectName</artifactId>


OR else

use this on pom.xml


<packaging>pom</packaging>


http://stackoverflow.com/questions/26021141/maven-child-module-does-not-exist

Project build error: 'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging.

Project build error: 'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging.

Add this to your pom.xml it solves the problem.
 
 
  <packaging>pom</packaging>
 
 
  if the parent project contains source code, I strongly suggest you to:

move this code in a new module (let's call it commons)
make commons a child module of your parent project
add the commons module as a dependency of all other modules requiring it (maybe all of them)
add <packaging>pom</packaging> in the parent pom.xml


More details you can have a look on this...

Thursday, 11 December 2014

How to wait until the element is present or load a banner in selenium java cucumber

Here the way how to wait until the element is present .

there are many ways to do this..

Thread.sleep(1000) is old static way of doing...

If you are waiting to load any image or banner or progress bar then you have to use javascriptexecutor technique

Another trick is to realise that the WebDriver instances implement JavascriptExecutor. This interface can be used to execute arbitrary Javascript within the context of the browser (a trick selenium finds much easier). This allows us to use the state of javascript variables to control the test. For example – we can have a variable populated once some asynchronous action has completed; this can be the trigger for the test to continue.

First, we add some Javascript to our example page above. Much as before, it simply loads a new page and updates the <div> with this content. This time, rather than show the div, it simply sets a variable – “working” – so the div can be visible already.

   

 /**
 * Call this method before an event that will change the page.
 */
private void beforePageLoad() {
    JavascriptExecutor js = (JavascriptExecutor) driver;
    js.executeScript("document.mpPageReloaded='notYet';");
}

/**
 * Call this method after an event that will change the page.
 *
 * @see #beforePageLoad
 *
 *      Waits for the previous page to disappear.
 */
private void afterPageLoad() throws Exception {
    (new WebDriverWait(driver, 10)).until(new Predicate<WebDriver>() {

        @Override
        public boolean apply(WebDriver driver) {
            JavascriptExecutor js = (JavascriptExecutor) driver;
            Object obj = js.executeScript("return document.mpPageReloaded;");
            if (obj == null) {
                return true;
            }
            String str = (String) obj;
            if (!str.equals("notYet")) {
                return true;
            }
            return false;
        }
    });
}

 http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/JavascriptExecutor.html

http://stackoverflow.com/questions/5868439/wait-for-page-load-in-selenium

Way 1:

WebDriverWait wait = new WebDriverWait(driver, 15);
  wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("xpath here")));
 
  System.out.print("Text box text3 is now visible");

Way 2:

In webdriver:
driver.findElement(By.id("")).isSelected or Enabled or Displayed)
{
//actions
Do some thing...
}

Way 3:

 //To verify element is present on page or not.
   String XPath = "//input[@id='text"+i+"']";
   Boolean iselementpresent = driver.findElements(By.xpath(XPath)).size()!= 0;
   if (iselementpresent == true)
   {
    System.out.print("element present..");
   }
   else
   {
    System.out.print("Element is not present");
   }


Way 4:

  if(selenium.isElementPresent(objectId)) 
//** it will check for the ObjectID in the Input sheet
                    {
                        driver.findElement(By.id(objectId)).clear();
 //** it will execute ,once it got the respective ObjectID

 }

Ref

http://stackoverflow.com/questions/20903231/selenium-wait-until-element-is-present

http://www.selenium-automation.co.uk/blog/selenium-iselementpresent-in-webdriver/

http://stackoverflow.com/questions/19851518/selenium-webdriver-wait-for-element-to-be-present-when-locating-with-webdriver

Wednesday, 24 September 2014

Easy to use editor to navigate from feature files to step definations for jvm Cucumber in eclipse

To navigate from feature files to step definitions easily .. you can use this Natural plug in.  
You can download this file from here

https://github.com/rlogiacco/Natural/wiki/Installation-Guide

Download Natural.zip file manually to your local machine

Open Eclipse 
Help-> Install New software

On available software click on Add button

Click on Archive button choose Nature.zip file and install .

Restart Eclipse 

If you are not sure how to archive file you can get help here
http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-127.htm


Now it will works.

Friday, 19 September 2014

How to check whether css selector is correct or not in Chrome selenium inspect elements

How to check whether css selector is correct or not in Chrome selenium inspect elements


Open Chrome browser
Right Click on any element click Inspect elements as a result you will get development tool

Select Console Tool there


And after that


$$(" here give your css selector path ")

for xpath we can check like this
$x('//*[@id="header-container"]')

And click enter path should select .

Tuesday, 29 July 2014

Guice provision errors on mac selenium cucumber automation java

Guice provision errors on mac

This problem occurs due to technical path errors
In my case I have given wrong path for chrome as below.. thats why its came.. After correcting path.. it resolved.

I have given this path as per windows .. thats why this path is not working on mac ... hence the below error occuring..

/Users/usreid/Desktop/automationframework/\\Applications\\Google Chrome.exe] 

After that I have change my path as per mac the it started working fine.

Click here how-to-setup-chrome-driver path -on-mac


Failure in after hook:RegistrationHooks.signOut()

Message: com.google.inject.ProvisionException: Guice provision errors:
1) Error in custom provider, org.openqa.selenium.WebDriverException: The chrome binary [/Users/usreid/Desktop/automationframework/\\Applications\\Google Chrome.exe] does not exist.

Build info: version: '2.37.0', revision: 'a7c61cbd68657e133ae96672cf995890bad2ee42', time: '2013-10-18 09:51:02'

System info: host: 'localhost', ip: '127.0.0.1', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.2', java.version: '1.6.0_65'

Driver info: driver.version: unknown

  while locating com.comapanyname.selenium.WebDriverProvider

  at com.comapanyname
.configuration.guice.WebDriverModule.configure(WebDriverModule.java:15)

  while locating org.openqa.selenium.WebDriver

    for parameter 1 at com.comapanyname.selenium.DocumentAccessor.<init>(DocumentAccessor.java:31)

How to setup chrome driver on mac selenium bdd cucumber automation

How to setup chromedriver path on mac laptop to selenium cucumber automation scripts.

1) First download chrome driver from the following path

2)  From your mac search for "AppleScript Editor"
AppleScript Editor will open editor please paste the below code and click run
do shell script "/Applications/Chromium.app/Contents/MacOS/Chromium --user-data-dir=/Users/$USER/Library/Application\\ Support/ChromiumPersonal > /dev/null 2>&1 &
Popup window will come and ask you to enter untittled name
enter "Chrome" Save it on Applications location.
3)Open chrome browser which is already installed on your mac and type below link on browser url
//Applications//Google Chrome.app//Contents//MacOS//Google Chrome
It will download chrome ... let it download
Then go to your Selenium or cucumber java code give this path as chrome driver path 
'//Applications//Google Chrome.app//Contents//MacOS//Google Chrome'
Now it should work . Note in MAC there is no .exe just like in windows system.Here we use above path.

If you feel it is useful please share on facebook and please like on facebook icon.


mvn command is not found on mac

Some times you might already fixed environment variables but after session out.. it will disappear.. in that case you have to do like this.
 Here I explained how to setup environment variable for Maven, Java

Since your installation works on the terminal you installed, all the exports you did, work on the current bash and its child process. but is not spawned to new terminals.
env variables are lost if the session is closed; using .bash_profile, you can make it available in all sessions, since when a bash session starts, it 'runs' its .bashrc and .bash_profile
Now follow these steps and see if it helps:
  1. type env | grep M2_HOME on the terminal that is working. This should give something like
    M2_HOME=/usr/local/apache-maven/apache-maven-3.1.1

  2. typing env | grep JAVA_HOME should give like this:
    JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home
Now you have the PATH for M2_HOME and JAVA_HOME.
If you just do ls /usr/local/apache-maven/apache-maven-3.1.1/bin, you will see mvn binary there. 
All you have to do now is to point to this location everytime using PATH. Since bash searches in all the directory path mentioned in PATH, it will find mvn.
  1. now open .bash_profile on Terminal  if you don't have one just create bash_profile
    vi ~/.bash_profile
Add the following:
#set JAVA_HOME
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home
export JAVA_HOME
M2_HOME=/usr/local/apache-maven/apache-maven-3.1.1
export M2_HOME
PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
export PATH
After this click on esc button and : and wq so that your file will save.
Now type
source ~/.bash_profile   click enter
This steps executes the commands in the .bash_profile file and you are good to go now. 
Now type mvn --version 

what is the best FTP for mac

FTP for Mac
You can download cyberduck from this location.
http://cyberduck.en.softonic.com/mac

Where is .m2 folder maven repository on mac

Where is .m2 folder which is a maven repository 

Via Find Folder on your mac 

If you search directly it won't appear so please follow as below steps
 To see .M2 repository path via folders 
Click on Go-> Find folder ->  type this ~/.m2 and click go
"~/.m2 "
==========================================================

To navigate to your .m2 folder in your mac terminal  


firstname.lastname@MRMAcNAME ~ %  cd ~/.m2

Now you are on .m2 folder to list all your files under .m2 use ls command


==========================================================

firstname.lastname@MRMAcNAME .m2 % ls

settings.xml settings.xml-20231012212836 settings.xml-20240403202322
repository

==========================================================
To navigate to particular file
firstname.lastname@MRMAcNAME .m2 % cd repository/monetdb/monetdb-jdbc/2.29/


==========================================================
Just in case if you want to delete your repository folder very quickly and easily use the below command 

firstname.lastname@MRMAcNAME .m2 % rm -rf repository

chrome driver download for mac laptop selenium cucumber bdd

Chrome driver download on mac 

How to generate keygen on mac

How to generate keygen on mac 
Here you can see all the details to setup git on your mac laptop
http://guides.beanstalkapp.com/version-control/git-on-mac.html

how to mention chrome driver path on mac for selenium bdd cucumber java

For Mac chrome driver resides in this path. Here in mac chrome path extentions is .app 

//Applications//Google Chrome.app//Contents//MacOS//Google Chrome

If your chrome driver is not working properly then 
Open this path on your browser so that automatically downloads chrome browser in required path.

Monday, 28 July 2014

vi or vim editor commands help

vi or vim editor commands help

http://www.cyberciti.biz/faq/save-file-in-vi-vim-linux-apple-macos-unix-bsd/

how to setup maven on Mac

Maven setup on Mac laptop

1) Being as a first point you have to download maven
Download from this link
http://maven.apache.org/download.cgi

2) Create folders on your mac
Click Go->Go to folder /usr/local
right click create new folder “apache-maven”
open this folder and again create sub folder
folder name “apache-maven-3.2.2” Hint- based up on your maven version you can put folder name

3)Then open Terminal command prompt .
localhost:~ userid$ cd /usr/local
localhost:local userid$ ls
apache-maven git libexec
localhost:local userid$ cd apache-maven
localhost:apache-maven userid$ ls
apache-maven-3.2.2
localhost:apache-maven userid$ cd apache-maven-3.2.2
localhost:apache-maven-3.2.2 userid$ export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.2
localhost:apache-maven-3.2.2 userid$ M2=$M2_HOME/bin
localhost:apache-maven-3.2.2 userid$ export PATH=$M2:$PATH
localhost:apache-maven-3.2.2 userid$ echo $JAVA_HOME
/Library/Java/Home
localhost:apache-maven-3.2.2 userid$ mvn --version
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T14:51:42+01:00)
Maven home: /usr/local/apache-maven/apache-maven-3.2.2
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.9.2", arch: "x86_64", family: "mac"

localhost:apache-maven-3.2.2 userid$ whereis mvn

To find path where is maven use this command
localhost:apache-maven-3.2.2 userid$mvn -version

Now your maven setup done.






More detailed Help details :

http://maven.apache.org/download.cgi
As per above link you can get details as below.

details available on bottom of the page. 
Extract the distribution archive, i.e. apache-maven-3.2.2-bin.tar.gz to the directory you wish to install Maven 3.2.2.
 These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-3.2.2 will
 be created from the archive.

In a command terminal, add the M2_HOME environment variable, e.g. export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.2.

Add the M2 environment variable, e.g. export M2=$M2_HOME/bin.

Optional: Add the MAVEN_OPTS environment variable to specify JVM properties, e.g. export MAVEN_OPTS="-Xms256m -Xmx512m".
 This environment variable can be used to supply extra options to Maven.

Add M2 environment variable to your path, e.g. export PATH=$M2:$PATH.

Make sure that JAVA_HOME is set to the location of your JDK, e.g.
 export JAVA_HOME=/usr/java/jdk1.7.0_51 and that $JAVA_HOME/bin is in your PATH environment variable.

Run mvn --version to verify that it is correctly installed.

how to setup up JAVA_HOME environment variable on mac

How to setup up JAVA_HOME environment variable on mac laptop

Being as a first point
Open Terminal from your mac this is command prompt on mac laptop.
Now type echo $JAVA_HOME it should return java details if it is already installed.
So that you will come to know. whether it is existed or not.

In Mac laptop all environment variables will setup in bash_profile

So if you are first time setting up in the scene it might not exist. So to let you know whether it is existed or not Type below command  on Terminal command prompt.

ls -1 ~/.bash_profile

If it is not existed then it will say “No such file or directory”

Now type this command
touch ~/.bash_profile

Now open file in vim editor this is editor in unix.
vim ~/.bash_profile
it will open some text editor.
If you try to type any thing on this.. it wont allow.. if you want to insert any thing please press
esc + i   it allow to enter data into vim editor

Now enter these lines on that editor

export JAVA_HOME=/Library/Java/Home
export JRE_HOME=/Library/Java/Home

Now you have to save and exit from the editor to do that please press escape : colon then wq
6. esc + :wq
To execute that file please enter this command.
7. source ~/.bash_profile
To check java details please enter this command
8. echo $JAVA_HOME
9.echo $JRE_HOME

Any how please have some help on this video
JAVA_HOME environment setup help video on mac



To make sure those environment variables work in all sessions.
We have to do as below.

type env | grep M2_HOME on the terminal that is working. This should give something like
M2_HOME=/usr/local/apache-maven/apache-maven-3.1.1

typing env | grep JAVA_HOME should give like this:
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home
Now you have the PATH for M2_HOME and JAVA_HOME.


now open .bash_profile on Terminal  if you don't have one just create bash_profile
vi ~/.bash_profile
Add the following:

#set JAVA_HOME

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home

export JAVA_HOME

M2_HOME=/usr/local/apache-maven/apache-maven-3.1.1

export M2_HOME

PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin

export PATH

After this click on esc button and : and wq so that your file will save.

Now type

source ~/.bash_profile   click enter

This steps executes the commands in the .bash_profile file and you are good to go now.

Now type mvn --version

How to install java on mac

How to install java on mac laptop
Installation steps you can get here
https://www.java.com/en/download/help/mac_install.xml

Java installation on mac help video

How to setup eclipse on mac

How to setup eclipse on mac laptop.

http://www.cs.dartmouth.edu/~cs5/install/eclipse-osx/

Thursday, 15 May 2014

How to mouse hover on menu in Selenium webdriver or BDD in Java

How to mouse hover on menu in Selenium webdriver or BDD in Java
In this scenario let assume there are 6 main menu items are there and you have to mouse hover on all menus then  you can use this code.
Hint :- Below you have to change your css selector details as per your website.

Actions action = new Actions(driver);

            int numberOfSubMenu = 6;

            // Hovering over each of the items in the top menu and testing the menu items
            for (int j=2; j<= numberOfSubMenu; j++) {

                WebElement elem = driver.findElement(By.cssSelector(".sf-menunew>li:nth-child(" + j + ")>a:nth-child(1)"));
                action.moveToElement(elem);
                action.perform();
                Thread.sleep(1000);
                 
            }

Tuesday, 13 May 2014

How to select size from dropdown in Selenium or BDD in Java


Select sele = new Select(driver.findElement(By.xpath("//*[contains(@id,'dropdown')]")));
           
            List<WebElement> sizeOptions = sele.getOptions();
            for(WebElement element: sizeOptions)
            {
                String sizeValue;
                String checkInStock = null;
                checkInStock = "In Stock";
               sizeValue = element.getText();
             
                if(sizeValue.contains(checkInStock)){
                    sele.selectByVisibleText(sizeValue);
                    System.out.println(sizeValue);
                   
                    break;
                }
            }
            Thread.sleep(1000);

Friday, 9 May 2014

How to wait till a banner or image loads in selenium webdriver java


http://stackoverflow.com/questions/5868439/wait-for-page-load-in-selenium



https://code.google.com/p/selenium/issues/detail?id=5309
http://www.programcreek.com/java-api-examples/index.php?api=org.openqa.selenium.JavascriptExecutor
http://stackoverflow.com/questions/17208935/org-openqa-selenium-webdriverexception-referenceerror-jquery-is-not-defined
https://github.com/ChonC/wtbox/blob/master/src/wtbox/util/WaitTool.java

Wednesday, 7 May 2014

Please make sure you have the correct access rights and the repository exists


$ git pull origin branch/OOP-123

ssh: git.proj.corp.com: no address associated with name
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


SOLUTION:

Your network is unable to connect to git server because it is unable to point the Git repository ip
Solution 1:
In your organization if you have multiple networks simply change your network to other network and try.

Solution2:
It is a permanent solution.

And it is DNS Settings problem and the machine simply could not reach the remote git repository.
Because you have to specify which DNS server have to use or which IP address should be used for a particular git domain.


DNA settings help :

It is good to ask your network administrator to setup these in oranization if you are not sure about these or else here
here you go for solution.

WAY1:

Map IP Addresses in hosts file.
This method allows you to create settings for individual domains without altering your main DNS preferences. This is useful if you don't have access to a DNS or if you want to specify the location of a single domain without interfering with any of your other online activities.

Open the following file in a plain text editor such as Notepad:
C:\WINDOWS\system32\drivers\etc\hosts

The file looks like the one below. At the end of the file (in this case, under the localhost entry), enter the IP and domain you wish to specify. When your browser attempts to access a domain it refers to this file first - if the domain is found here then the specified IP address will be used.
If the domain is not found here, then the normal DNS server (as specified above) will be used.


WAY 2:

Goto My Computer -> Dailup Networking
Right click your internet connection and select Properties
Window will open click the Server Types Tab and then click TCP/IP Settings.

Click Properties.

git no address associated with name fatal: Could not read from remote repository

When ever you try to pull some thing from Git it will give the below error

$ git pull origin branch/OOP-123

ssh: git.proj.corp.com: no address associated with name
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


SOLUTION:

Your network is unable to connect to git server because it is unable to point the Git repository ip
Solution 1:
In your organization if you have multiple networks simply change your network to other network and try.

Solution2:
It is a permanent solution.

And it is DNS Settings problem and the machine simply could not reach the remote git repository.
Because you have to specify which DNS server have to use or which IP address should be used for a particular git domain.


DNA settings help :

It is good to ask your network administrator to setup these in oranization if you are not sure about these or else here
here you go for solution.

WAY1:

Map IP Addresses in hosts file.
This method allows you to create settings for individual domains without altering your main DNS preferences. This is useful if you don't have access to a DNS or if you want to specify the location of a single domain without interfering with any of your other online activities.

Open the following file in a plain text editor such as Notepad:
C:\WINDOWS\system32\drivers\etc\hosts

The file looks like the one below. At the end of the file (in this case, under the localhost entry), enter the IP and domain you wish to specify. When your browser attempts to access a domain it refers to this file first - if the domain is found here then the specified IP address will be used.
If the domain is not found here, then the normal DNS server (as specified above) will be used.


WAY 2:

Goto My Computer -> Dailup Networking
Right click your internet connection and select Properties
Window will open click the Server Types Tab and then click TCP/IP Settings.

Click Properties.

Website application security testing


https://www.randomstorm.com/services/web-application-assessments/?gclid=COqHn-S5mb4CFccSwwodBTcALQ

http://www.pgistrontium.com/our-services/penetration-testing

Friday, 2 May 2014

SVN Commit has encountered a problem svn: Unable to connect to a repository RA layer request failed

org.apache.subversion.javahl.ClientException:RA layer request failed

svn commit failed
svn unable to connect to a repository at URL
Svn url

Solution: 

For this problem you have to check network is connected or not change network and try it will work.


SVN comment template

DDD-234 - User Name #comment updated credit card expiry date

Wednesday, 23 April 2014

How to install Java

First of all download Java from the below link and don't forget to check whether it is 32 bit or 64 bit .


http://www.java.com/en/download/manual.jsp

And follow installation steps here
http://www.java.com/en/download/help/windows_offline_download.xml#download

Video link :
Here you have links to install Java
https://www.youtube.com/watch?v=o-4zBeg2rtc

Live chat help
And even you can get live help
http://www.liveperson.com/lp/java-help/?BanID=22489#.U1e4avldW3Q

Thursday, 17 April 2014

What is crowd testing



U-test provides service call it as “crowd sourced” testing model with a global community of professionals.
The community reflects the diversity (e.g. multiple geographic locations, languages spoken) of the apps and users themselves.

We can consider it as user satisfaction testing because testers might come from different countries with different Operating systems ,real devices and real network conditions.
And at the same time we can consider it as exploratory testing as well because they are exploring an application without having predefined document and finding a bugs.

Wednesday, 16 April 2014

'mvn' is not recognized as an internal or external command, [closed]

First of all type this command

mvn -version


It should show some path where  maven has installed.

If maven is not installed install maven

After installation of maven
Type this command on command prompt
echo %MAVEN_HOME%

It should show the path if you would have had already setup environment variables.

If not please follow these steps to setup environment variables

Start-> Computer -> Right click on this
Click on -> Properties -> Advanced system settings ->


Advanced (tab)-> Environment Variables



Now click on "path" variable



Click on OK


Now again on command prompt type this one
echo %MAVEN_HOME%
it should show details



How to set up environment variables for Java and Maven

Start-> Computer -> Right click on this
Click on -> Properties -> Advanced system settings ->


Advanced (tab)-> Environment Variables



http://www.itechtalk.com/thread3595.html



Now click on Path variable



difference between java cucumber and .net Specflow

Here you can get good explanation with examples

http://www.kenneth-truyers.net/2013/08/25/automated-acceptance-testing-with-cucumber-for-net-and-java/

How to do Force update snapshots / releases maven on eclipse

And after that go to Eclipse 

Right click on your project after that
Maven -> Update your project - >
Click Force update of  snapshots / Releases




Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5

Solution :
Under .M2 folder(hint: click on start->search for .M2 it will show list of folders select .M2 folder)

Settings.xml file might be missing proxy settings or

Your proxy settings password expired

Just in case if you don't have any proxy details you can use this

<?xml version="1.0"?>
<settings>
 <proxies>
  <proxy>
   <active>true</active>
   <protocol>http</protocol>
   <host>proxyurl</host>
   <port>8080</port>
   <username>proxyusername</username>
   <password>password</password>
  </proxy>
 </proxies>
</settings>


And after that go to Eclipse 

Right click on your project after that
Maven -> Update your project - >
Click Force update of  snapshots / Releases




what is the path or where can I find settings.xml file

Start -> Search for .m2 folder

you will get folder  open that folder..

you can see settings.xml file.

-bash: mvn: command not found

For this  your settings.xml is not proper.

Start -> Search for .M2 folder

Open .M2 folder and replace settings.xml

Friday, 4 April 2014

How to remove or delete cookies in firefox mozilla browser

To remove cookies in Firefox

Tools -> Options -> Privacy - > Firefox will (Dropdown) -> User custom settings for history

Click on Show Cookies button

Please find screen shot steps here
https://support.mozilla.org/en-US/kb/delete-cookies-remove-info-websites-stored

Tuesday, 18 March 2014

How to do test estimation


http://sqa.fyicenter.com/FAQ/Testing-Techniques/How_to_do_Estimating_Testing_effort_.html


http://www.requirementdriventesting.com/testing-estimate/

http://www.qualitytesting.info/forum/topics/test-effort-estimation?id=2064344%3ATopic%3A458859&page=2#comments


Automation test estimation
http://www.stepinforum.org/Test_Automation/TA_finaltalk/PDFs/Papers/TEST%20AUTOMATION%20EFFORT%20ESTIMATION.pdf


Saturday, 1 February 2014

Nice links

http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons

http://www.coderanch.com/t/619203/design/Pros-cons-BDD-TDD

http://programmers.stackexchange.com/questions/188027/is-bdd-scalable-for-medium-to-large-projects

http://programmers.stackexchange.com/questions/45927/what-is-the-role-of-qa-in-a-bdd-driven-project?rq=1

Monday, 27 January 2014

latest version of Chrome driver exe file download

You can download from here


http://chromedriver.storage.googleapis.com/index.html?path=2.8/

unable to discover open pages selenium java error

For this error please updated your jar files with latest version of selenium .

By going here
http://docs.seleniumhq.org/download/

Next change your .exe Chrome driver file with latest version.

http://chromedriver.storage.googleapis.com/index.html?path=2.8/

Thursday, 23 January 2014

Monday, 6 January 2014

how to type or print euro symbol from keyboard

CTR + ALT +4


It will print € symbol.

received WebDriver request: POST /session

Solution:
Analysing


Console error :

"sessionId":"24d23535e36bc0db8111af6f04c69e01",
"status":0,
"value":{
"ELEMENT":"0.864296494284644:3"
}
}
[1012.521][INFO]: received WebDriver request: POST /session/24d23535e36bc0db8111af6f04c69e01/element/0.864296494284644:3/clear {
   "id": "0.864296494284644:3"
}
[1012.521][INFO]: waiting for pending navigations...
[1012.522][INFO]: done waiting for pending navigations
[1012.548][INFO]: waiting for pending navigations...
[1012.548][INFO]: done waiting for pending navigations
[1012.548][INFO]: sending WebDriver response: 200 {
   "sessionId": "24d23535e36bc0db8111af6f04c69e01",
   "status": 0,
   "value": null
}
[1013.552][INFO]: received WebDriver request: POST /session/24d23535e36bc0db8111af6f04c69e01/element {
   "using": "xpath",
   "value": "//input[@id='dwaafrm_singleshipping_lastName']"
}
[1013.552][INFO]: waiting for pending navigations...
[1013.552][INFO]: done waiting for pending navigations
[1013.570][INFO]: waiting for pending navigations...
[1013.570][INFO]: done waiting for pending navigations
[1013.570][INFO]: sending WebDriver response: 200 {
   "sessionId": "24d23535e36bc0db8111af6f04c69e01",
   "status": 0,
   "value": {
      "ELEMENT": "0.864296494284644:3"
   }
}

Time elapsed sec FAILURE! java.lang.reflect.InvocationTargetException: null

Solution:
Analysing

http://frankkieviet.blogspot.ca/2006/10/classloader-leaks-dreaded-permgen-space.html


Error looks as below
at sun.reflect.GeneratedConstructorAccessor14.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:191)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:404)
at org.openqa.selenium.By$ByXPath.findElement(By.java:344)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
at com.MNSIntl.Utils.clickJS(Utils.java:325)
at com.MNSIntl.Keywords.menDress(Keywords.java:1132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.MNSIntl.Master_Driver.cardPaymentTest(Master_Driver.java:414)

Friday, 3 January 2014

Could not resolve dependencies for project / Failed to execute goal on project

Solution :
Under .M2 folder(hint: click on start->search for .M2 it will show list of folders select .M2 folder)

Settings.xml file might be missing proxy settings or

Your proxy settings password expired

Just in case if you don't have any proxy details you can use this

<?xml version="1.0"?>
<settings>
 <proxies>
  <proxy>
   <active>true</active>
   <protocol>http</protocol>
   <host>proxyurl</host>
   <port>8080</port>
   <username>proxyusername</username>
   <password>password</password>
  </proxy>
 </proxies>
</settings>

Problem example:
Could not resolve dependencies for project ProjectName:ProjectName:jar:1.0: Failed to collect dependencies for [org.uncommons:reportng:jar:1.1.2 (test), javax.mail:mail:jar:1.4.3 (compile), net.sourceforge.jexcelapi:jxl:jar:2.6 (compile), org.seleniumhq.selenium:selenium-java:jar:2.38.0 (compile), log4j:log4j:jar:1.2.16 (compile), junit:junit:jar:4.8.1 (test), org.testng:testng:jar:6.3.1 (test), com.opera:operadriver:jar:1.2 (compile)]: Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:2.38.0: Could not transfer artifact org.seleniumhq.selenium:selenium-java:pom:2.38.0 from/to central (http://repo.maven.apache.org/maven2): java.lang.NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException