How to insert values inside a text field which uses Bootstrap Tags Input?

I tried with clearing the values and using sendKeys() I tried inserting the values.  But it showed “Element must be user-editable in order to clear it.”

RVS Train Asked on August 3, 2015 in Selenium WebDriver.
Add Comment
4 Answer(s)

Hi rava.
I googled a lilltle about this problem and. Concluded
1) you can try manually performing the action on the element and see if that works..??

2) make sure that xpath u are using belong to a single web element by using firepath

ankit ramola Vice Professor Answered on August 3, 2015.
Add Comment

Hi ankit ramola,

Reply for your comments point wise:

1. “try manually performing the action” are you meaning that I need to check it manually by entering the values in that field? If yes, then I have tested it and it works perfectly well.

2. xpath I’m using is “html/body/div[2]/div[1]/div[1]/div/div/div/form/div[2]/div/div[1]”. I think this is the path of single web element.

Am I doing anything wrong?

Thanks for the response..

RVS Train Answered on August 3, 2015.

Ok Rama can u verify that xpath on firepath( which is a add on to firebug). That if it belongs to a single element..??

on August 3, 2015.

Yes. I verified the xpath by typing it in console within $x(“”) and when hovered over the result, it perfectly shows the actual item.  I’m attaching a screenshot. In it when I hover over this item “html/body/div[2]/div[1]/div[1]/div/div/div/form/div[2]/div/div[1]” it shows the actual item. For your information: I don’t know why ‘.tagsinput’ is highlighted in red. Please ignore the xpath that ends with textarea.RE: How to insert values inside a text field which uses Bootstrap Tags Input?

on August 3, 2015.

Can you please post your real time scenerio if possible…??

on August 3, 2015.

Sorry, I cannot.

on August 3, 2015.
Add Comment

Hi ankit ramola,

Finally I got a solution for this. I was trying with wrong element’s xpath. I tried again with firepath by selecting the element. The element is “html/body/div[2]/div[1]/div[1]/div/div/div/form/div[2]/div/div[1]/div[1]/input” and I was able to  insert values.

Thank you for your help.

RVS Train Answered on August 4, 2015.
Add Comment

Hi ankit ramola,

Finally I got a solution for this. I was trying with wrong element’s xpath. I tried again with firepath by selecting the element. The element is “html/body/div[2]/div[1]/div[1]/div/div/div/form/div[2]/div/div[1]/div[1]/input” and I was able to  insert values.

Thank you for your help.

RVS Train Answered on August 4, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.