Jump to content
UBot Underground

Recommended Posts

Within a loop, I'm using "$next list item" to type into an input box from a list.  This causes the item to have a comma at the end of it.  Example: "dog,"  How can I hit backspace to delete the comma before moving on with my script?  I have tried typing {BK} and {Backspace} into the "Text to Type" field following the "$next list item", but that doesn't work.

 

For reference, I have pro version 4.

Thanks.

Link to post
Share on other sites

Hi!  I just tried it but it didn't work-here are the two ways I tried it:

 

Attempt 1:

set(#removecomma, $replace($next list item(%searchterms), ",", $nothing), "Global")
type text(<id="search-home-input">, $next list item(%searchterms), "Standard")

Attempt 2:

type text(<id="search-home-input">, $next list item(%searchterms), "Standard")
set(#removecomma, $replace("<id=search-home-input>", ",", $nothing), "Global")
Link to post
Share on other sites

 

Hi!  I just tried it but it didn't work-here are the two ways I tried it:

 

Attempt 1:

set(#removecomma, $replace($next list item(%searchterms), ",", $nothing), "Global")
type text(<id="search-home-input">, $next list item(%searchterms), "Standard")

Attempt 2:

type text(<id="search-home-input">, $next list item(%searchterms), "Standard")
set(#removecomma, $replace("<id=search-home-input>", ",", $nothing), "Global")

 

You were close with attempt one. The only thing you did wrong was not type the new variable you just created, you typed the same old list item.

Should have been 

set(#removecomma, $replace($next list item(%searchterms), ",", $nothing), "Global")
type text(<id="search-home-input">, #removecomma, "Standard")

But... you could also simplify it by doing one line of code:

type text(<id="search-home-input">, $replace($next list item(%searchterms), ",", $nothing), "Standard")
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...