Giter Site home page Giter Site logo

pageobjectmodel's Introduction

Page Object model Test automation framework using Selenium with Java, TestNG and Maven-

This is a sample project to demonstrate what is page object model framework and how it can used in selenium to automate any application. TestNG is used as test framework.

Dependency Java Maven

###libraries used Selenium TestNG log4j Extent Reports

Steps to clone execute the tests

git clone https://github.com/naveenanimation20/PageObjectModel
cd PageObjectModel
mvn clean test

pageobjectmodel's People

Contributors

autocurry avatar munna-k avatar naveenanimation20 avatar vatsald2809 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pageobjectmodel's Issues

DataProvider- validateCreateNewContact

On TestUtil, I am getting error :

TestUtil

When I run the test:
Console shows:
SKIPPED: validateCreateNewContact
java.lang.RuntimeException: java.lang.Error: Unresolved compilation problems:
Type mismatch: cannot convert from org.apache.poi.ss.usermodel.Sheet to org.apache.poi.sl.usermodel.Sheet
The method getLastRowNum() is undefined for the type Sheet
The method getRow(int) is undefined for the type Sheet
The method getLastRowNum() is undefined for the type Sheet
The method getRow(int) is undefined for the type Sheet
The method getRow(int) is undefined for the type Sheet

Can you please help me fix it?

java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject

I have created my project by going through POM with datadriven approach videos posted on youtube, I want to pass username and password in username and password input box by using xlsx file("Naukaridata.xlsx"), but I am getting following errors
java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject is seen and after going through logs I can see for this line in util class book = WorkbookFactory.create(file) an error is also seen in login test class in line Object[][]data= TestUtil.getTestData(sheetname)
I am attaching my project which includes all pom test base util classes and xlsx file , so you can help me.
Waiting for your reply
Parag Borawake
Myproject.zip

/Users/naveenkhunteta/Documents/workspace/FreeCRMTest/src/main/java/com/crm/qa/testdata/FreeCrmTestData.xlsx (No such file or directory)


T E S T S

Running TestSuite
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@e73f9ac
java.io.FileNotFoundException: /Users/naveenkhunteta/Documents/workspace/FreeCRMTest/src/main/java/com/crm/qa/testdata/FreeCrmTestData.xlsx (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at java.io.FileInputStream.(FileInputStream.java:93)

I would like to take screenshot with extent reports

Hi @naveenanimation20 ,

With this code, I am able to get Extent report but not screenshot with this.
The code is available here https://github.com/naveenanimation20/ExtentReportCode/blob/master/src/test/java/FreeCRMTest.java
for the screenshot but How Can I use this PageObjectModel.
This seems like test case wise facility.

I am expecting Page Object Model + Extent Report + Screenshot.

I am sure that I am missing something.Can you please guide me?

Thanks,
Ravi

Not able to hover on the Contacts page

Hi Naveen,
In the Classic freeCRM wbesite after clicking on contacts page... once it open.. I want to click on new contacts by using below code,but it is giving me error as element not visible. Can you please help to resolve the issue

Actions action=new Actions(driver);
action.moveToElement(contactLink).build().perform();
Thread.sleep(2000);
action.moveToElement(newContactLink).build().perform();
new WebDriverWait(driver,30).ignoring(StaleElementReferenceException.class).until(ExpectedConditions.visibilityOf(newContactLink));
newContactLink.click();

[Utils] [ERROR] [Error] org.testng.TestNGException thrown when executing ContactsPageTest

TestNG version 6.14.3
[Utils] [ERROR] [Error] org.testng.TestNGException:
Cannot inject @test annotated Method [validateCreateNewContact] with [class java.lang.String, class java.lang.String, class java.lang.String, class java.lang.String].
For more information on native dependency injection please refer to http://testng.org/doc/documentation-main.html#native-dependency-injection

Here is the test case
@test(priority = 1)
public void validateCreateNewContact(String title, String firstName, String lastName, String company) throws IOException
{

	homepage.clickOnNewContact();
	contactpage.createNewContactform("Mr.", "Tom", "Peter", "Google");
	// (title, firstName, lastName, company);

}

Data Driven Test Issues

I tried copy paste the excel file that has my test data in my Project , when i click on that file its shows this ...i have added all the apache poi jar files on the project. What should i do?
PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���PK���

Also , I have the excel utilities that has all the methods and functions but still showing error
if(cell.getCellType()==Cell.CELL_TYPE_STRING) Error is CELL_TYPE_STRING cannot be resolved or it is not a field. Please help.

can you provide the testng file for this project

As I am having issues with my project, i.e I want to maintain same URL throughout different classes with usage of testng,
can you help with that?
how do you call it thru testng?
By mentioning all pagetest classes in xml file?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.