Check for existance of values for keyword

I make use of 2 Library’s in the basis.

-SeleniumLibrary
and for some scripts: Browser library (playwright focussed)

now…

for some keywords in the script the keyword was

Fill text //*[contains(text(),'Inzicht')] the-text

but it has to be re-changed to SeleniumLibrary

thus

Input text //*[contains(text(),'Inzcht'] the-text

now…

as soon as I change: Fill text → to → Input text…

the result is
Input text locator text //*[contains(text(),'Inzcht'] the-text

my desire/wish is:

please let it check for existance of already present input after the keywords…
if it’s there, let it be.
if nothing is there… show the “template” structure locator text

otherwise adapt intelligently

Hi @valentijnpeters ,

You have Keyword Should Exist as part of builtin, if you combine that with Run Keyword If or Run Keyword Unless you should be able to produce the logic your after if I understood your question correctly?

Dave.

No you misunderstood.

so from 1 library keyword to another library keyword.

fill text → input text

changing it
gives also the “what can I fill in here”
where it already has … stuff standing.

argh this is hard to explain haha

Hi,

You should file an issue at the GitHub repo of your browser.
This is not part of Robot Framework itself.

Maybe you mean Language Server Plugin from RoboCorp.

I agree with you, by the way. :wink:

1 Like

Hi,

Ah I think I see, you’re converting a selenium script to a browser script? and the editor is inserting the unwanted locator text?

As @René mentioned, this is not a robotframework issue, which editor are you using? you will need to file a bug with the developer of that editor or editor plugin.

This happens to me too ,I use Atom as an editor with a syntax plugin, that does this, but it never annoyed me enough to log an issue.

1 Like

I got reverted from here Browser Library

to this part of the forum so it is not my fault so to speak.

Browser Library info website has to change it.

IDE used is: Visual Studio Code.

Browser library has to change the locator text thingy as well… I think.

René it is true that I use Robocorp. How to reach those guys haha, trying: @Mario_Robocorp
By the way this morning Robocorp got automatically upgraded/updated to 0.36.0 or so. that caused some configuration issues, (so not that very well backwards compatible it looks)

(by the way 2: robotframework LSP for VSC got updated on the same day hmmmm (is that good or bad or doesn’tmatter))

the thing that is not backwords compatible has something to do with:
TypeError: main() got an unexpected keyword argument ‘log_prefix’

edit add: Okay found the problem finally: Robotframework LSP can not be the latest version, so you can Upgrade Robocorp to 0.36.0 but you can not update RobotFramework LSP to the latest version as well because they can’t work together (yet!) @github.com/robocorp/robotframework-lsp group of people…

Maybe. Anyway you should file an issue at