U
U
Uncle Bogdan2021-05-30 10:43:31
C++ / C#
Uncle Bogdan, 2021-05-30 10:43:31

Is there a replacement for selenium functions in CefSharp?

Tipo with the help of selenium, you can do cool things. Tipo:

IWebElement element = Browser.FindElement(By.XPath("//*[@id='gb']/div/div[1]/div/div[1]/a"));


But selenium for testing? If the customer does not have a specific browser, then that's it ...
There is Cef, but there are no such functions as in selenium, is there any compromise?
I have an html page, is there any version of selenium that just needs to give the html to be torn to pieces?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-05-30
@motkot

If the customer does not have a specific browser, then everything ...

You can package the browser along with the application. Or use Playwright - it even downloads the browser itself.
There is Cef, but there are no such functions as in selenium, is there any compromise?

Use css selectors instead of XPath. In this case there will be something like this
#gb > div > div:nth-of-type(1) > div > div:nth-of-type(1) > a

either use document.evaluate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question