-1

I am trying to enter some value in text box using Karate UI automation using the below command

And input("textarea[class=ace_text-input]", 'index = "int_rtrapp-dev_k8s" container_name="rr-hebeat-inbound" "' + tracID + '"')

In the above command karate is ignoring the Hyphen between the "int_rtrapp-dev_k8s" and also "rr-hebeat-inbound"

Can someone guide me how to fix this issue, i tried few things like assigning those two words to a variable and use the variable same as i use for tracID but that is also not working

sarath
  • 455
  • 1
  • 11
  • 26
  • most likely because there is some javascript on the page preventing it. unless you can provide a way to replicate, I can't help you – Peter Thomas Feb 28 '22 at 05:03
  • Hi @PeterThomas we were able to tackle this issue by using the below command * def query = 'index="" container_name=""' * replace query.indexName = 'int_rtrapp-dev_k8s' Then print query * replace query.containerName = 'rr-hebeat-inbound' Then print query * script("document.querySelector('.ace_editor').env.editor.setValue('"+query+"')") – sarath Mar 01 '22 at 17:30

1 Answers1

1

I was able to tackle the issue using the below command

* def query = 'index="<indexName>" container_name="<containerName>"' * replace query.indexName = 'int_rtrapp-dev_k8s' Then print query * replace query.containerName = 'rr-hebeat-inbound' Then print query * script("document.querySelector('.ace_editor').env.editor.setValue('"+query+"')")
sarath
  • 455
  • 1
  • 11
  • 26
  • great. I told you there was some fancy JS somewhere right :) here's a related answer: https://stackoverflow.com/a/67701399/143475 – Peter Thomas Mar 01 '22 at 18:55