I am doing the automation using the java script elements with playwirtht package and how shoud i match with c# code moving forward can you guys help me in this
Loading
I am doing the automation using the java script elements with playwirtht package and how shoud i match with c# code moving forward can you guys help me in this
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jayraj ChhayaPosted Oct 23, 2024, 7:39 AM
To find the correct elements for automation in C# using Playwright, you can leverage the same selectors you used in JavaScript. Playwright supports various selector strategies, including CSS selectors, XPath, and text selectors. Here’s a simple example of how to locate an element using C#:
In this example, we navigate to a webpage and locate an element using a CSS selector. You can adapt the selector based on your specific needs. Ensure that the selectors you use in C# match those from your JavaScript code to maintain consistency in your automation scripts.