Hi can you explain how to create a POM without using page factory in latest selenium version 4.9 using C#. As we have upgraded the selenium version from 3.141 to 4.9, the Page Bys are not supporting and throwing error like "System.TypeInitializationException : The type initializer for 'APPresentationReports.Bys' threw an exception. ----> OpenQA.Selenium.InvalidSelectorException : Compound class names not allowed." Please help me to resolve
@maximumautomation Жыл бұрын
Hi, Page factory is deprecated now in latest version of selenium. So instead of using page factory , you can create your page elements using By object By searchElement= By.Xpath("//div[@class='search']"); and then you can use this element inside your page methods. public void SearchItem(String item){ driver.FindElement(searchElement).SendKeys(Item); }