Any way to disable warning from console and report in robot framework

I am seeing below kinds of warning in console and in html while executing robot script.
Any way to hide or disable warning?

Can you share some more details?

@bagginstyrone
I am executing robot script. e.g. I have written below code to scroll the page. Code is working fine but it giving warning like mentioned in above snapshot. I want to disable or hide warning from console or html log as those are creating confusion.

Scroll Down Page with key
    Log To Console    scrolling down page
	set test message
    ...  | Pressing Downkey to scroll page
    Press Key   xpath=//body        \ue00f    # this is the Page Down key
    set test message
    ...  | Pressed Downkey to scroll page

I did not find anything useful on google groups -https://groups.google.com/g/robotframework-users

Hi @bk-user ,

Those warnings are there for a good reason, they are telling you that there is a problem with your test that requires your attention to fix, and they are even kind enough to tell you how to remove them.

Take this example from your screenshot:


I’ve highlighted the step you need to take to remove this warning.

Dave.

@damies13

I tried by changing code as suggested in the warning.
e.g.
I used Press Keys instead of Press key but code did not worked and warning was removed. Thats the reason I have to suppress those warning

Hi @bk-user ,

Did you try it like this:

Press Keys   xpath=//body        PAGE_DOWN    # this is the Page Down key

Or if you really need to use the key codes, you might need to escape the escape character

Press Keys   xpath=//body        \\ue00f    # this is the Page Down key

It will be better for you in the long run to use the non-deprecated keywords and sort out any issues with those rather than continuing to use deprecated keywords. Because at some point in the future those deprecated keywords will be removed and your test will stop working completely. Those warnings are reminding you to take action before that happens and it becomes an emergency for you.

Dave.

1 Like