iFrames, "Frame-Contexts" and IBM BPM

NOTE: The DOM changed in CF2017.06 (https://developer.ibm.com/bpm/2017/06/ibm-bpm-8-5-7-cf2017-06-now-available/) and the text below only applies to versions before CF2017.06.

My current project has a pleasing focus on quality and a longer term view than many I have worked on. It’s probably just a co-incidence that the project isn’t based in the UK. In any event, I have been spending some quality time with Cucumber, Selenium, Java and Jenkins (for IBM BPM automated testing).

My previous, less mandated, endeavours in this area never really reached maturity, or an acceptable level of robustness. One of the reasons for this was always the highly translucent box that is IBM BPM’s use of iFrames. When Selenium tests are running they always have a single “frame-context" i.e. you can only interact with controls in your current “frame-context".

Here is a summary of my learnings (I’m working with the out-the-box Portal in v8.5.7):

There is *always* a single top-level frame with Title=Portal (marked “Navigation" and coloured green in the diagram). This is the iFrame that you need to be in to interact with the Navigation Menus.

=> Navigation is [Root, 0] or [Root, Title=Portal]

The first child of this iFrame is the content that pertains to the current selection in Title=Portal. It's Title will be the name of the Navigation Item. The content (marked “Service / Dashboard" and coloured blue in the diagram) will live inside another child iFrame and it's Title will be the Coach name.

=> Inbox is [Root, 0, 0, 0] or [Root, Title=Portal, Title=Work, Title=Work]
=> Gary's Cool Service is [Root, 0, 0, 0] or [Root, Title=Portal, Title=Gary's Cool Service, Title=Coach]

The second child (of Title=Portal) is for the Active Task. It's Title will be the Task Subject. The content (marked “Task" and coloured red in the diagram) will live inside another child iFrame and it's Title will be the Coach name.

=> Some Task is [Root, 0, 1, 0] or [Root, Title=Portal, Title=Some Task, Title=Coach]
=> Some Other Task is [Root, 0, 1, 0] or [Root, Title=Portal, Title=Some Other Task, Title=Coach]

These are only three "frame contexts" that you ever need to worry about. Below is some Java code to help you on your way. It also includes a method to explicitly specify an iFrame by Title (which can be helpful in certain situations).


IBM BPM projects seem well behind the industry when it comes to the use of automated testing but if you consider yourself as an IBM BPM Developer, you will need this particular tool in your repertoire one day soon...


comments powered by Disqus