Not Able to edit XML in a branch of a GIT HUB repository

I am not able to edit an xml in a git repository.
While i am able to navigate till the pom.xml page in the repository and also able to click edit button , post which i am not able to select and edit a given tag in the xml i.e version tag.
as seen in the screenshot . I have tried multiple methods to resolve this and surprising fact is i am able to get the value of the intended tag using GetText() even though SetText() doesnt work-
WebUI.setText(findTestObject(‘object repo path’), ‘’)

  1. SetText - gives element not interactable error . :- error given below.
  2. WaitForElement - so as to wait for the element to be available but in vain.
  3. Send Keys - so as to use SHIFT+HOME to select the text and then press DELETE ,
    but that resulted in send keys error .
  4. Using JS -
    WebElement element = WebUiCommonHelper.findWebElement(findTestObject(‘textarea’),
    WebUI.executeJavaScript(“arguments[0].value=‘’”, Arrays.asList(element)). This step doesnt give any error but doesn’t edit too
  • Katalon Studio Version: 7.2.1
  • OS Version:Windows 10
  • Browser Version:Chrome - 83.0.4103.116

Steps to reproduce - try editing any xml within a github repository page
Error stack trace for setText() :-

com.kms.katalon.core.exception.StepFailedException: Unable to set text ‘’ of object ‘Object Repository/Release auto/Page_Source of pomxml - SCOE - Tele2 NL Bitbucket/textarea’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.setText(SetTextKeyword.groovy:66)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:72)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:950)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText$ Source)
at Scoe Branch Branch change:83)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(
at com.kms.katalon.core.main.TestCaseExecutor.runScript(
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(
at com.kms.katalon.core.main.TestCaseExecutor.execute(
at com.kms.katalon.core.main.TestCaseMain.runTestCase(
at com.kms.katalon.core.main.TestCaseMain.runTestCase(
at com.kms.katalon.core.main.TestCaseMain$runTestCase$ Source)
Caused by: org.openqa.selenium.InvalidElementStateException: invalid element state


Before working on Katalon Studio, I would suggest to you to learn how to use “Google Chrome Developer Tool” and understand how the DOM of your target web page looks like.

@kazurayam , we have inspected using the DOM of the target web page . Also there isnt any issue with the locator since in GetText the value of the locator is visible .Kindly help

I do not know how to do it using usual Katalon Studio instructions such as setText, sendKeys, executeJavaScript.

The locator to <textarea> may work getting the text inside it. But it does not mean you can automagically parse and edit the XML content inside the <textarea>. You need to drive a lot more technologies — parsing an XML document with XMLSlurper or DOM4J, and transforming XML document using XSLT, etc. It is a long long way to go and too difficult.

You want to change the content string of <version>....</version> tag in the pom.xml of your Maven project, right?

It would be far easier if you download the XML file from Bitbucket to your local PC using git clone command, edit the <version> value manually using text editor, do git add and git commit, then upload the file to Bitbucket using git push command. All can be done manually just easily.

I do not see any reason why you want to automate this process using web browser and Katalon Studio. Why not you do it using bash + git + sed.

1 Like

Thanks for the insight @kazurayam . I was trying to automate the stuff using katalon, but need to look elsewhere now.

Yes, you should. Katalon is not the tool to do that sort of work.