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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Atlassian upm page-objects library: error while binding PluginManager page to class

I'm trying to test an add-on I develop using atlassian-universal-plugin-manager-pageobjects  library ( https://mvnrepository.com/artifact/com.atlassian.upm/atlassian-universal-plugin-manager-pageobjects ) from Maven central. I'm using the latest version of atlassian-universal-plugin-manager-pageobjects (tried 2.19-mapps-m5 and 2.18.4) and Atlassian Bitbucket v5.0.0.

I'm running just

bitbucket.visit(PluginManager.class);

function, but it fails due to timeout:

com.atlassian.pageobjects.binder.PageBindingWaitException: [PageObject:com.atlassian.upm.pageobjects.PluginManager@62417a16]
        at com.atlassian.pageobjects.binder.InjectPageBinder$WaitUntilPhase.execute(InjectPageBinder.java:519)
        at com.atlassian.pageobjects.binder.InjectPageBinder$InjectableDelayedBind.advanceTo(InjectPageBinder.java:647)
        at com.atlassian.pageobjects.binder.InjectPageBinder$InjectableDelayedBind.bind(InjectPageBinder.java:628)
        at com.atlassian.pageobjects.binder.InjectPageBinder.navigateToAndBind(InjectPageBinder.java:124)
        at com.atlassian.webdriver.bitbucket.AbstractBitbucketTestedProduct.visit(AbstractBitbucketTestedProduct.java:63)

Caused by: java.lang.AssertionError: Query <com.atlassian.pageobjects.elements.query.Conditions$And:
 -com.atlassian.pageobjects.elements.query.webdriver.WebDriverLocatableBasedTimedCondition[interval=100,defaultTimeout=20000][locatable=WebDriverSingleLocator[locator=By.id: upm-panel-manage],valueProvider=hasClass]
 -com.atlassian.pageobjects.elements.query.webdriver.WebDriverLocatableBasedTimedCondition[interval=100,defaultTimeout=20000][locatable=WebDriverSingleLocator[locator=By.id: upm-panel-manage],valueProvider=hasClass]>
Expected: is <true> by 20000ms (default timeout)
Got (last value): <false>
        at com.atlassian.pageobjects.elements.query.Poller.waitUntil(Poller.java:196)
        at com.atlassian.pageobjects.elements.query.Poller.waitUntil(Poller.java:114)
        at com.atlassian.pageobjects.elements.query.Poller.waitUntilTrue(Poller.java:36)
        at com.atlassian.upm.pageobjects.PluginManager.waitUntilTabIsLoaded(PluginManager.java:105)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at com.atlassian.pageobjects.binder.InjectPageBinder.callLifecycleMethod(InjectPageBinder.java:260)
        at com.atlassian.pageobjects.binder.InjectPageBinder.access$900(InjectPageBinder.java:79)
        at com.atlassian.pageobjects.binder.InjectPageBinder$WaitUntilPhase.execute(InjectPageBinder.java:508)
        ... 33 more

The reason why this happens is in

at com.atlassian.upm.pageobjects.PluginManager.waitUntilTabIsLoaded(PluginManager.java:105)

It waits until an element with id="upm-panel-manage" has 2 CSS classes: "upm-selected" and "loaded" while in 2 my browsers (Firefox and Chrome) the fully loaded "upm-panel-manage" element effective contains only "upm-selected" (and "upm-panel" but this doesn't matter):

<div id="upm-panel-manage" class="upm-panel upm-selected">
   ...
</div>

So I wonder how that could happen at all if UPM plugin has so many tests? And how would I overcome the problem? Should I wait for the next release of atlassian-universal-plugin-manager-pageobjects library?

I tried to instantiate a class from PluginManager as a work-around to redefine waitUntilTabIsLoaded() call, this allowed to overcome this error at this very steps, but other methods bind PluginManager class explicitly, so it didn't help.

0 answers

Suggest an answer

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

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,391 views 1 8
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