Findelementbyxpath is not available in Selenium 4, Any work around?

Findelementbyxpath is not available in Selenium 4, Any workaround?

All methods that arent available after Selenium 4
FindElementByClassName
FindElementByCssSelector
FindElementById
FindElementByLinkText
FindElementByName
FindElementByPartialLinkText
FindElementByTagName
FindElementByXPath
FindElementsByClassName
FindElementsByCssSelector
FindElementsById
FindElementsByLinkText
FindElementsByName
FindElementsByPartialLinkText
FindElementsByTagName
FindElementsByXPath

Only these 2 are available

FindElement
FindElements

$ChromeDriver.FindElementByXPath(’//*[@id=“organic-div”]/form/div[3]/button’).Click() is not working.

Maybe this ?

$ChromeDriver.FindElement([OpenQA.Selenium.By]::XPath(’//*[@id=“organic-div”]/form/div[3]/button’))

reffering to:

2 Likes