Hello, i got this accept pop up and I am not able to to use the click element to accept and move on with the test case.
Any help please.
Hello, i got this accept pop up and I am not able to to use the click element to accept and move on with the test case.
Any help please.
Hi! Is that a public website? If so, please provide a link. If not, can you paste the HTML markup?
Thanks! This works for me:
*** Settings ***
Library RPA.Browser.Selenium
*** Tasks ***
Accept cookies
Open Available Browser https://hub.knime.com/
Click Element When Visible css=.accept-button
The example uses RPA.Browser.Selenium but the same should work with plain SeleniumLibrary using Wait Until Element Is Visible.
I am getting the below error:
No keyword with name âClick Element When Visibleâ found.
The example uses a different library, see above.
Then I have an other newbie question. I did search for that library in Pycharm but could not find it.
Hi! Tried to mention in the original that you can do the same with SeleniumLibrary. You probably missed that.
That worked thanks a lot :slight_smile. How do you extract the CSS?
Short answer: browser inspector tools
This article explains the topic in more detail: How to find user interface elements using locators in web applications
That was very useful thanks again. I have now stuck again with the username and password fields
How are you stuck? What have you tried?
I was able to clear that after few tries.
I need to handle an or situation. Like if the first one does not work try the other one type of stuff.
Just as a side note - thereâs probably a CSS class or a UI element text you can target. The current selector would break quite easily if the HTML structure changes even a bit. I warmly recommend finding a shorter way to point to whatever element you are pointing to.
Regarding the âorâ question: You have a few options.
Run Keyword And Ignore Error Click some-selector
Run Keyword And Ignore Error Click another-selector
That will try and click both and ignore any errors. They donât care if something fails. The end result should be that if either succeeds, you can then proceed with the script.
Another option is to check if the elements exist before clicking and only clicking if they do exist.
What is your use case here?
I am using the css but the space keep moving as I had work flow so it work once and then failed because the element has moved.
Is that element behind the login? If not, I could give it a try.
Yes it is after login
Well, Iâm a member now! Can you tell what you were trying to do and with what elements?
Thank you
this keeps moving as I create new spaces so first time test pass but then after it does fail because it as moved.
I have no idea about this application. What are spaces and where do I create them? If you can point me there, then I might be able to help with the elements.