Skip to main content

I’m working on UI tests using Acumatica’s Test SDK which wraps around selenium. There are a number of things that I would like to do which the Test SDK does not seem to provide functionality for. My question is, can I use vanilla Selenium alongside the Test SDK and if so how? Specifically I’m wondering how/if I could go about connecting to the same WebDriver(which to my understanding is how Selenium sends commands to the browser). When I try creating a new WebDriver and using that it ends up creating a new browser window which is not what I’m wanting.

 

Other info 

Browser : Chrome

OS : Windows 10

Acumatica Version : 23r2

 

Here is the sample code I used to create a new WebDriver but like I said it opens in a new window not the window that is already open. 

var driver = new ChromeDriver("C:\\Projects\\TestSDK_23_105_0016_17\\Chrome");

 

Hi @AaronB

Pinging you on this since you seemed to indicate that Selenium code could be used alongside the Acumatica TestSDK in this thread :
 

 

Thanks,
Philip Engesser


Hi Thanks for the ping!

You can use Browser.WebDriver to use the same browser window I believe. Browser comes from 
“using Core.Core.Browser;”

 

Here is an example.
var paybtn = Browser.WebDriver.FindElement(By.XPath("//button/@id='payBtn']"));


@AaronB thank you very much, that worked great!

Just as a note for any one else who might read this thread later on, I also had to switch to the main iframe in order to get Selenium to find elements in the main area of the page since Acumatica uses iframe’s for the main body of the different pages. Sample code is below.

Browser.WebDriver.SwitchTo().Frame("main");

 


Reply