Im trying use Katalon Studio on Jira. Basically, I want to move a task from “In Progress” to “Concluded”.
I tried both approaches in this tutorial, It worked in Jquery and W3 studio practice exercises but when I tried to the same thing in Jira, Katalon Studio recorder, stops for a little, then stars the dragging, but it doesn’t move, and after some seconds he moves a little and drops in the same place.
I choosed the right division to drop ( used spy like in the exercises ).
why to do that from webUI approach?
Jira have a very decent API, using it you can do amazing stuff sometime not possible from web.
Are you hired by Atlassian to test this product?
I tested with the API approach successfully but I still need to do it with the Web approach.
Katalon does not move the “mouse” before trying to find the destination, and in Jira, the boxes that I want to Drop the object into, only appear after the user drags the object a little. Katalon does not find the xpath that I am giving, and tries other options, dragging and dropping in the wrong locations.
Is possible to drag the box using an offset (?) for example before doing the drag to the final destination ( and check for the final destination xpath after the drag with offset)? Or other solution for this issue?
I do not currently have access to a Jira site, so I am not sure what the sites HTML looks like when it comes to the task and the columns.
In Azure Devops however which also has tasks you can drag and drop to different columns, I can click and drag a task to a different column, then check that tasks HTML elemenets for an attribute called aria-label which will contain the column name. Therefore I can do a check to see if the HTML attribute contains the columns name after the click and drag to offset
I noticed that, in Jira, if the mouse is released to soon, the issue will go back to the originating column.
In your case looks like it is not moving at all.
So, I suppose, it has something to do with the selector you are using for the target column, you may have to inspect carefully the html of the Jira dashboard and tune it manualy.
the spy tool only produce a ‘best guess’ but most of the time the result is not good enough
I know that Katalon DragAndDropToOffset , exists, but what I meant was a function that drags a little (with an offset) and then drops on a given element.
You can reproduce it, by clicking on the box and not moving the mouse. And Katalon tries to find the object that I said he should drop the box. But the problem is that the object does not exist in the HTML yet.
When you click on the object and you start dragging, Jira will generate the code with the drop options, and when you drop that code will disappear from the HTML. I am now trying to find out how this code is generated.
When you drag the box a little it will look like this
I have been trying to solve your problem by setting up a test environment in Jira and testing it myself. I understand what you are experiencing, but I can also not get the task to move to where I want it.
On other sites drag and drop to test object and offset works perfectly, but in Jira it just doesn’t want to move the task and it takes forever for katalon to find the test objects I want to interact with on Jira.
I suggest you do not use Jira as your site to test katalon studio with and move on from this issue. Jira was not meant for automation training.
Jira is using a lot of scripts and customizations under the hood.
Happens that I am a Jira admin so I know what I am speaking about (at work. at home, the wife is the manager)
I used both, on-prem and cloud instances.
Altough the pages may apear having a simple and clear HTML structure when the user inspect it, once an action is performed lot of stuff hapens.
So, I also sugested, from the begining:
To perform automated actions on Jira, using the API is the best solution
(depending on the needs, if custom workflows and automated rules are needed without using the API, then scriptrunner may help)
To learn Katalon, use something else (unless you are a brave and wanna learn it the hard way)
From what I can see in the screenshot posted I can deduct some things.
I assume the project is using the most basic workflow (it’s a software type project I assume) where a certain issue type can be moved from any state to any other (available) state.
This is fine. This is the most Agile workflow Jira offer… and I love it, we encourage all of our teams to use it.
For the Epic issue type looks like at least two transitions are possible (from TO DO to IN PROGRESS or BLOCKED).
Which is abit odd from an Agile perspective … how an Epic can be blocked? An Epic is just a collector of the total team effort (Stories, Tasks, Bugs etc)…
So, it should have only three states, planning, on going and completed.
But nvm … moving forward … back to the topic.
Since the dashbord have a single target column, when moving the issue to this column the user has to decide into what state should be.
So, attempting to automate this, will somehow confuse the selenium ‘logic’ under the hood.
The HTML code of the dragged object is changing (most probably imediately after is clicked and moved 1 pixel) … so the selector used to locate it no longer matches
In addition to that, the HTML code of the target column is also changing (note that when the transition is in progress, it gets highlighted, if you will have two columns for each transition possible you will notice both of them are in such state)
So, everything depends on the original selector used, I guess.
From what I see in my case, two attributes are preserved, data-issue-id and data-issue-key.
Such are unique, since are comming directly from Jira DB which does not allow duplicates.
So, what may work:
locate the needed card by whatever selector you curently use
rettrieve one of those attributes
build a new test object using the retrieved attribute as selector
attempt to move it (by offset or by selector to target column)
Ofcourse, you should carefully inspect your dashboard, we use a heavily pimped one so the HTML may look completely different
Well, ofcourse.
My examples came from our production instance, which is a cloud one with an enterpise licence.
Yours may be different, so you can show to us how does it looks in your case with the hope we can find something relevant.
That seems to be the html code of the target column.
Please inspect the card (Story 1) as I did in my example.
First thing to solve is the locator for this one.
Side note, an Epic is not a Story, read my previous posts. An Epic can collect stories and other issue types.
So, for the sake of learning Agile methodologies properly, either use Epic1 Epic2 etc for your issues, or create Story issues if you preffer that name
Of-course this has nothing to do with the testing you are trying to do, but common, take some time and read about Agile methodologies since you are learning Jira also.