Answer the question
In order to leave comments, you need to log in
How to check for text in Selenium or PhantomJS + C#?
Hello. Tell me how to check for the presence of text in Selenium or PhantomJS + C#?
On the site, after clicking on the button, there can be 2 options for the text that will appear. Depending on the version of the text, you need to prescribe further actions. Selenium uses a chromedriver. I plan to switch to a phantom later, so that the tests are run in the background without opening the browser.
I can find the element on the loaded page by css selector, I pass the value of the text to the variable. But further, with the usual
IF (remennaya == "Text") the condition is not met, although I know for sure that the variable has the text that I set in the condition
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question