All Projects → primefaces-extensions → primefaces-selenium

primefaces-extensions / primefaces-selenium

Licence: MIT License
PrimeFaces testing support for Selenium

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to primefaces-selenium

arquillian-graphene
Robust Functional Tests leveraging WebDriver with flavour of neat AJAX-ready API
Stars: ✭ 91 (+468.75%)
Mutual labels:  selenium
gcf-packs
Library packs for google cloud functions
Stars: ✭ 48 (+200%)
Mutual labels:  selenium
test login
问卷星
Stars: ✭ 53 (+231.25%)
Mutual labels:  selenium
instagram-post-scheduler
Python Program To Schedule Your Instagram Posts
Stars: ✭ 30 (+87.5%)
Mutual labels:  selenium
carina-demo
Carina demo project.
Stars: ✭ 40 (+150%)
Mutual labels:  selenium
rec-a-sketch
content discovery... IN 3D
Stars: ✭ 45 (+181.25%)
Mutual labels:  selenium
demo-webdriverio-cucumber
E2E Tests with WebdriverIO and Cucumber
Stars: ✭ 28 (+75%)
Mutual labels:  selenium
RomanceBreaker
Python script which sends a custom morning message to your significant other every morning at a given time range on Facebook Messenger, WhatsApp, Telegram or SMS, for lazy people
Stars: ✭ 36 (+125%)
Mutual labels:  selenium
impf-bot
💉🤖 Bot for the German "ImpfterminService - 116117"
Stars: ✭ 167 (+943.75%)
Mutual labels:  selenium
hcaptcha-solver-python-selenium
hCaptcha solver and bypasser for Python Selenium. Simple website to try to solve hCaptcha.
Stars: ✭ 32 (+100%)
Mutual labels:  selenium
PyWhatsapp
Python script to control whatsapp web using terminal
Stars: ✭ 20 (+25%)
Mutual labels:  selenium
image-crawler
An image scraper that scraps images from unsplash.com
Stars: ✭ 12 (-25%)
Mutual labels:  selenium
EHX
Realtime Browser Element Verification Tool [Stable]
Stars: ✭ 29 (+81.25%)
Mutual labels:  selenium
Selenium.WebDriver.Extensions
Extensions for Selenium WebDriver including jQuery/Sizzle selector support.
Stars: ✭ 46 (+187.5%)
Mutual labels:  selenium
kick-off-web-scraping-python-selenium-beautifulsoup
A tutorial-based introduction to web scraping with Python.
Stars: ✭ 18 (+12.5%)
Mutual labels:  selenium
SJS DROPS
Script using requests module to register accounts to Slam Jam Socialism raffles.
Stars: ✭ 21 (+31.25%)
Mutual labels:  selenium
pystest
WEB UI自动化测试框架,selenium结合python,测试人员不需要会代码,只需要写配置即可实现,并且方便懂代码的测试人员扩展
Stars: ✭ 24 (+50%)
Mutual labels:  selenium
pyscrapper
📷 web scrapping in python: multiple libraries -requests, beautifulsoup, mechanize, selenium
Stars: ✭ 50 (+212.5%)
Mutual labels:  selenium
nightwatch-boilerplate
boilerplate for nightwatch.js with selenium
Stars: ✭ 16 (+0%)
Mutual labels:  selenium
Ucampus
解放双手,u校园的题再也不用写啦(暂停维护
Stars: ✭ 28 (+75%)
Mutual labels:  selenium

⚠️ MIGRATED TO PRIMEFACES CORE ⚠️

Maven Javadocs License: MIT Actions Status Stackoverflow

primefaces-selenium

PrimeFaces testing support based on JUnit5, Selenium and the concept of page objects / fragments. It also supports JUnit5 parallel test execution to speed up tests.

PrimeFaces-Selenium provides a hook-in to either startup a local server, use a remote adress and to instantiate the WebDriver.

This is the successor of primefaces-arquillian and heavily inspired by Arquillian Graphene.

Configuration

PrimeFaces-Selenium requires a /primefaces-selenium/config.properties to set a PrimeSeleniumAdapter. A sample implementation, which starts a local TomEE, can be found here: TomEE Adapter and FireFox TomEE Adapter

Properties:

property name type default description
adapter org.primefaces.extensions.selenium.spi.PrimeSeleniumAdapter Adapter/Hook-In implementation class
guiTimeout int 2 GUI timeout for waits in seconds
ajaxTimeout int 10 AJAX timeout for guards in seconds
httpTimeout int 10 HTTP timeout for guards in seconds
documentLoadTimeout int 15 Document load timeout in seconds
disableAnimations boolean true If animations should be disabled for tests

Compatibility

Only tested on PrimeFaces 10.0.0+.

Status

Currently, only the following components are implemented (partially):

HTML

  • Link

JSF / PrimeFaces

  • AccordionPanel
  • AutoComplete
  • Calendar
  • CascadeSelect
  • Chips
  • CommandButton
  • CommandLink
  • ConfirmDialog
  • ConfirmPopup
  • DataList (use DataView)
  • DataTable
  • DatePicker
  • Dialog
  • InputMask
  • InputNumber
  • InputSwitch (use ToggleSwitch)
  • InputText
  • InputTextarea
  • Messages
  • OutputLabel
  • OverlayPanel
  • Panel
  • Password
  • Rating
  • Schedule
  • SelectBooleanCheckbox
  • SelectBooleanButton
  • SelectManyCheckbox
  • SelectOneButton
  • SelectOneMenu
  • SelectOneRadio
  • Slider
  • Spinner
  • TabView
  • TextEditor
  • Timeline
  • ToggleSwitch
  • TriStateCheckbox

Contributions are very welcome ;)

Usage

Creating component without annotations:

InputText input=PrimeSelenium.createFragment(InputText.class,By.id("test"));

Example view:

import org.openqa.selenium.support.FindBy;
import org.primefaces.extensions.selenium.AbstractPrimePage;
import org.primefaces.extensions.selenium.component.InputText;
import org.primefaces.extensions.selenium.component.SelectOneMenu;

public class IndexPage extends AbstractPrimePage {

    @FindBy(id = "form:manufacturer")
    private SelectOneMenu manufacturer;

    @FindBy(id = "form:car")
    private InputText car;

    public SelectOneMenu getManufacturer() {
        return manufacturer;
    }

    public InputText getCar() {
        return car;
    }

    @Override
    public String getLocation() {
        return "index.xhtml";
    }
}

Example test:

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.primefaces.extensions.selenium.AbstractPrimePageTest;

public class IndexPageTest extends AbstractPrimePageTest {

    @Inject
    private AnotherPage another;

    @Test
    public void myFirstTest(IndexPage index) throws InterruptedException {
        // right page?
        Assertions.assertTrue(index.isAt());
        assertNotDisplayed(index.getCar());

        // just to follow the browser with a human eye for the showcase :D - not need in your real tests
        Thread.sleep(2000);

        // select manufacturer
        assertDisplayed(index.getManufacturer());
        index.getManufacturer().select("BMW");
        Assertions.assertTrue(index.getManufacturer().isSelected("BMW"));

        // just to follow the browser with a human eye for the showcase :D - not need in your real tests
        Thread.sleep(2000);

        // type car
        assertDisplayed(index.getCar());
        index.getCar().setValue("E30 M3");

        // just to follow the browser with a human eye for the showcase :D - not need in your real tests
        Thread.sleep(2000);

        another.goTo();
        
        ...
    }
}

Build & Run

  • Build by source mvn clean install

Releasing

  • Run mvn versions:set -DgenerateBackupPoms=false -DnewVersion=8.0.5 to update all modules versions
  • Commit and push the changes to GitHub
  • In GitHub create a new Release titled 8.0.5 to tag this release
  • Run mvn clean deploy -Prelease to push to Maven Central
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].