Hello,
In my application, ShadowDOM elements are used, so finding it it difficult to identify using selenium library, so was exploring some other tools which supports ShadowDOM and i found that Browser library with Robot framework and playwright supports shadowDOM. My question is as Browser library is powered by Playwright, so should i use playwright directly or browser library has all the features supported by playwright. Your responses would really help me finalizing the tool.
Browser Library is a wrapper around playwright, so by using Browser Library you are using playwright.
Actually many of the Robot Framework Libraries are wrappers around the underlying tech, this is actually a good thing as you donât need to learn so many languages, you just need to learn the Robot Framework syntax/approach, but an extra benefit is you can also easily combine tools that wouldnât normally be easy to combine so by using Robot Frameworkâs Libraries you can get that extra benefit.
Thanks Dave, your inputs gave me insight about leveraging the capabilities of Robot framework by using different libraries. I think its better to use BROWSER library with Robot framework over Playwright.
It helps me to decide as well. BTW, I would like to ask a similar question:
The syntax of Playwright differs from Browser library, are there some good sites so that I can see the differences? For example, if someone has good knowledge of Playwright, can he/she easily use Browser library instead? or vice versa? Thanks
The differences probably come from the difference in syntactical style of robot framework vs a programming language.
Robot Framework is designed to read like a test case that a manual tester would write for another manual tester to follow, itâs not perfect at this goal but itâs exceptionally close compared to any other automation tool iâve used, even the tools I previously developed to achieve a similar goal didnât come close, so I dropped what I had built and switched to Robot Framework when I found it (I have no shame in admitting someone else did a better job than me).
Iâm not sure what language Playwright, Javascript I guess based on itâs dependancy on Node.js, but programming languages are not designed to be easy for humans to read but rather easy for computers to interperate while being âeasy enoughâ for programmers to read.
Start out by writing the steps you want to achieve in plain English bullet points, then find the keyword that most closely matches what you wrote, bear in mind for some of the validation steps the keywords from the BuiltIn Library or another Library might be more relevant than the ones in Browser Library, and thats ok, use those, this is the real power of Robot Framework
Once you get familiar with the keywords that are in the library youâll start using them without having to look them up, it comes naturally surprisingly quickly.
Another tip, you can write your own keywords in any language you like, so you can build your own library of keywords in your preferred language (ä¸ĺ ?) that simply wrap the keywords you use often, if your project team all speak the same language this might be the test cases easier or more comfortable for your team, Of course if youâre in an English speaking or a multinational company then itâs probably best to stick to the original keywords.
Hi Dave,
Thank you very much for your tips! Do you have a few useful sites for Robot Framework (advanced) examples of UI and API testing, with or without using Browser Library?
Does anyone have a mapping developed between Selenium Library Keyword and Browser Library keyword. e.g. In selenium library its âInput Textâ, for same action âFill Textâ is used in Browser library.
Nothing specifically however youâre welcome to study the TestDataTable test cases there are REST API and browser (SeleniumLibrary and Browser Library) test cases for the TestDataTable application.
I am trying to click the button inside the shadow-root. I tried browser library and Angular library. Nothing seems to be working. Its not identifying the locator at all
This is my locator //button[@id = âundefinedâ]