Before hitting that Ask the Community button, make sure to:
Hi everyone,
I am trying to automate setting up workflows in Asana. To do so, I simply record myself doing the set-up. However, I have noticed that my bot always fails when I try to make a third subtask under my first card. It can make the first two steps every time, but the third step is the problem. I do not understand why this is the case.
These are my steps.
selenium.open("https://app.asana.com/0/1208527008239193/1208527274415874")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='EINGANG'])[1]/following::*[name()='svg'][2]")
selenium.click("xpath=//div[@id='lui_20121']/div/div/span[2]")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Eine Aufgabe wurde in einen Abschnitt verschoben'])[1]/following::*[name()='svg'][1]")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Funktioniert mit Aufgaben und Unteraufgaben'])[1]/following::label[1]")
selenium.click("xpath=//div[@id='lui_20302']/div/div/div/div[2]/div/div/div[2]/div/div")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='EINGANG'])[2]/following::span[1]")
selenium.click("xpath=//div[@id='lui_20442']/div/div/div/div[2]/div[4]/div/div[2]/div/div/div[2]/div/span")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[1]")
/* Katalon Studio does not support: editContent */
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[43]")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[2]")
/* Katalon Studio does not support: editContent */
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[61]")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[3]")
/* Katalon Studio does not support: editContent */
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='TELEFONAT'])[1]/following::*[name()='svg'][2]")
selenium.click("xpath=//div[@id='lui_21154']/div/div/span[2]")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='TELEFONAT'])[2]/following::label[1]")
selenium.click("xpath=//div[@id='lui_21308']/div/div/div/div[2]/div[4]/div/div[2]/div/div/div[2]/div/span")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[1]")
/* Katalon Studio does not support: editContent */
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[43]")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[2]")
/* Katalon Studio does not support: editContent */
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[61]")
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[3]")
/* Katalon Studio does not support: editContent */
selenium.click("xpath=(.//*[normalize-space(text()) and normalize-space(.)='VIDEO-CALL'])[1]/following::*[name()='svg'][2]")
Welcome to our community. Thank you for sharing your issue. I see that you are testing with Selenium. Can you please help share your screen recording so that we can better support?
Hi @Elly_Tran, thank you for your response. I want to clarify the request you made to me: âThank you for reuploading your issue. Please help follow on the previous thread so that others can follow up better. Thank youâ. Did you want me to answer you on this thread, or did you want me to do something else? I am not sure what you meant by âhelp followâ. Please clarify and I will do it.
Sorry for my late response. Your issue seems to be related to editContent when all 3 attempts failed at the editContent step. Can you please double-check your Xpath? And give us your error log for better support. Thank you
||Command|Target|Value| | --- | --- | --- | --- | ||open|https://app.asana.com/0/1208527008239193/1208527274415874||
||click|xpath=(.//[normalize-space(text()) and normalize-space(.)=âEINGANGâ])[1]/following::[name()='svg'][2]||
||click|xpath=//div[@id=âlui_20121â]/div/div/span[2]|| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Eine Aufgabe wurde in einen Abschnitt verschoben'])[1]/following::*[name()='svg'][1]|| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Funktioniert mit Aufgaben und Unteraufgaben'])[1]/following::label[1]|| ||click|xpath=//div[@id='lui_20302']/div/div/div/div[2]/div/div/div[2]/div/div|| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='EINGANG'])[2]/following::span[1]|| ||click|xpath=//div[@id='lui_20442']/div/div/div/div[2]/div[4]/div/div[2]/div/div/div[2]/div/span|| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[1]|| ||editContent|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[31]|Step 1| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[43]|| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[2]|| ||editContent|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[49]|Step 2| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[61]|| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[3]|| ||editContent|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[66]|sTEP 3| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='TELEFONAT'])[1]/following::*[name()='svg'][2]|| ||click|xpath=//div[@id='lui_21154']/div/div/span[2]|| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='TELEFONAT'])[2]/following::label[1]|| ||click|xpath=//div[@id='lui_21308']/div/div/div/div[2]/div[4]/div/div[2]/div/div/div[2]/div/span|| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[1]|| ||editContent|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[31]|sTEP 1| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[43]|| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[2]|| ||editContent|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[49]|sTEP 2| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[61]|| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::p[3]|| ||editContent|xpath=(.//*[normalize-space(text()) and normalize-space(.)='Unteraufgaben erstellen'])[2]/following::div[66]|STEP 3| ||click|xpath=(.//*[normalize-space(text()) and normalize-space(.)='VIDEO-CALL'])[1]/following::*[name()='svg'][2]||
Hi,
that is the error log from the Log tab. I am not sure what I should edit the content on the XPath to be.
The structure of the error XPath is the same as the XPaths that work, except the error XPath has div[66]. As I understand, the div indicates where on a page the cursor or the element should be. How can I fix that, and how can I know what I should edit the XPath to be?
I also want to understand why the Katalon recording of the Asana set up captures the first two steps fine, but fails on the third step. The three buttons I click are not very different, so what would be causing the problem?
xpath=(.//*[normalize-space(text()) and normalize-space(.)=âUnteraufgaben erstellenâ])[2]/following::div[66]
The âpathwayâ is based on the HTML, so that is what we would need to see to check what pathway you are using and what it âshouldâ be.
You can check the pathway yourself if you right click on the object of the browser application and choose âInspectâ from the pop-up. If you right click a second time on the object and select âInspectâ again, the specific Objectâs HTML will display. If you hit CTRL + F in the HTML area, then the Find text box displays. Copy and paste the pathway into the Find box and you should see 1 of 1 appear on the right-hand side of the Find box. Anything else and you have issues with the pathway. If you get 0 of 0, that means the pathway is wrong. If you get 1 of xx, that means your pathway is not unique.
If the âInspectâ does not show in the pop-up, then hit the F12 key and choose, Open DevTools. The first tool on the top left can be used to âInspectâ each object.
Try that and see if your pathways returns an unique pathway for your object.
Ok, this is what I found when I clicked Inspect on the page and then Inspect a SECOND time on the button for Unteraufgabe hinzufĂźgen. What do I do now? I am not quite sure what to do. I searched in the HTML for the faulty XPath, which is this: xpath=(.//*[normalize-space(text()) and normalize-space(.)=âUnteraufgaben erstellenâ])[2]/following::div[66]
I then searched for //div[@role=âbuttonâ and contains(@class, âButtonThemeablePresentationâisEnabledâ) and contains(text(), âUnteraufgabe hinzufĂźgenâ)] and I found it in the HTML, so 1 of 1.
I am not sure what to do. As I understand, getting 1 of 1 means this pathway is unique, so why does my bot not recognize it? What do I do to fix my bot?
This is not an application that is nice to Testers, as there are not âuniqueâ identifiers in the attributes. Having to rely on a pathway like .../div[66]. YIKES.
Unfortunately, your final code did not âsurviveâ being copied to this forum, as the structure got lost. You should put 3 backticks, like ```, on a line by themselves above your code and another set of 3 backticks on a line by themselves below your code.
However, maybe you can replace the .../div[66] with:
What the above does is find the text, âUnteraufgabe hinzufĂźgenâ, which was in your code, and then looks up the chain to find the first <div>. You might also try:
I tried copying it with the apostrophes, but it did not retain the structure.
I tried replacing my div 66 with yours, but they did not work.
Alternatively, is there a tool for Mac with which I can simply record myself doing a thing and then a bot does that thing? I found Katalon because it is one of the few tools on Mac that claims to do that.
I agree with @grylion54. The web page is too difficult to automate using WebDriver-based tools.
You asked âWhy does Katalon Recorder fail to âŚâ. In my humble opinion, this is not the way you should think. This web page is not designed to be automate-able; only human can comfortably operate it.
If I were asked to do that job, I would refrain from any Browser-automation tools like Katalon Recorder. On the other hand, I found that Asana provides a RESTful API :
The Asana API is a RESTful interface, providing programmatic access to much of the data in the system. It provides predictable URLs for accessing resources, and uses built-in HTTP features to receive commands and return responses. This makes it easy to communicate from a wide variety of environments: apps, command-line utilities, gadgets, and even the browser URL bar itself.
The WebService Testing feature of Katalon Studio may help you write a set of codes that automates setting up workflow in Asana. How to use Katalon Studioâs WS feature? See the following article for example
In order to write code in Katalon Stuido, you are supposed to be skilled for Java/Groovy programming.
To drive RESTful APIs, there are a lot of other platforms. Many people use Postman. Or Playwright might be another candidate. These tools require you to be skilled for JavaScript/TypeScript programming.
Which tool to use? â It would depend on which programming language you prefer; how much you are skilled for programming.
Hi there, and thanks for posting in the Katalon community!
To help you faster, please review our guide on Katalon Recorder here: Katalon Recorder overview | Katalon Docs. Double-checking the steps and configurations might resolve the issue.
If the doc doesnât help, feel free to provide more details, and a community member will assist you soon. Thanks for being a part of our community!
For future reference, NOT the apostrophes but backticksâfound on the same key as the tildè on the far-left side of keyboard beside the 1 key (with exclamation mark).