Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Writing integration tests for Confluence using PageObjects

Hi,

The tutorial Writing integration tests using PageObjects gives an example for Jira.

But I can't make it work for Confluence.

I've added following dependencies in my pom.xml

<dependency>
			<groupId>com.atlassian.confluence</groupId>
			<artifactId>atlassian-confluence-pageobjects</artifactId>
			<version>${confluence.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.atlassian.confluence</groupId>
			<artifactId>confluence-webdriver-pageobjects</artifactId>
			<version>2.0.10</version>
			<scope>test</scope>
		</dependency>

So I have now access to com.atlassian.confluence.webdriver.pageobjects.page.ConfluenceAbstractPage

But I didn't find the class TestBase used in the JIRA example and I don't know how to access confluence() object instead of jira()

public class TestCsvSetupPage extends TestBase {
	@Test
	public void testSetupPage() {
		CsvSetupPage setupPage = jira().gotoLoginPage()
			.loginAsSysAdmin(CsvSetupPage.class);
		CsvProjectMappingPage mappingPage = setupPage
			.setCsvFile("JIM-77.csv").setDelimiter(";").next();
	}
}

I found also confluence-plugin-functest-library repository. But there is no read me and I don't know if I have to use it.

And also Tips for Functional Tests with Selenium and Run Wired Tests with the Plugin Test Console

I'm a little bit confuse with all these tutorials. 

Can anyone help me?

Regards

Xavier

1 answer

1 accepted

1 vote
Answer accepted

After some research and perseverance, I managed to write integration tests for Confluence using PageObjects.

I wrote a tutorial: https://seuqra.atlassian.net/wiki/display/ACDD/Tutorial+-+Writing+integration+tests+for+Confluence+using+PageObjects.

The source code is also available: https://bitbucket.org/seuqra/confluence-pageobjects-integration-tests-tutorial

Enjoy coding and testing :smile:

I want to create child page to the parent page ID supplied 

any thoughts how d i open connection to Confluence then create a new page ?

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Comparison between Zephyr & Xray

I am sharing this article with both Zephyr and Xray information and everything should be in one place. It will be easy to know when selecting Zephyr or Xray. Zephyr and Xray are both Jira plug-ins u...

180 views 1 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you