Export to C# with WebDriver and MSTest


#1

With Selenium IDE it was possible to create a custom format for exporting. I created one for C# with WebDriver and MSTest. (Not everyone can afford the enterprise version of Visual Studio!)

Are there any plans for the same ability in Katalon Recorder?

If there are no plans, can I request a new export format for the aforementioned combination? I know it’s a fairly trivial task to export as C# with WebDriver and NUnit and do a global replace on the keywords, but it’s just a chore having to do it for every test case. I could even supply you with my custom format if it would help.


#2

Hi,

Thank you for using Katalon Recorder, and sorry for the late response.

We welcome and appreciate all contributions from users. Don’t hesitate to send us your custom format, we will try to integrate it to Katalon Recorder as soon as possible.


#3

This is the format script I used for exporting tests from Selenium into C# / MSTest / Webdriver.

I hope it helps in some small way.

SeleniumExport_CSharp_MSTest_WebDriver.zip


#4

Thank you so much Mark! The script looks great. We need a couple of days for testing, so the new version will be released this week.


#5

Hi Mark,

Your script has been integrated into version 3.0.3 :).

Thank you so much for your contribution. We would love to add your name to our acknowledgement section - is it OK for you?


#6

Yes, that would be fine. I’m glad it helped.


#7

@dev.alex.88@gmail.com I have tried exporting using the C# (Webdriver + MSTest) option but it is using the same template as C# (Webdriver + NUnit). Consequently the attributes on the methods and the ‘using’ statements are incorrect for use in MSTest projects.


#8

Mark Gibson said:

@dev.alex.88@gmail.com I have tried exporting using the C# (Webdriver + MSTest) option but it is using the same template as C# (Webdriver + NUnit). Consequently the attributes on the methods and the ‘using’ statements are incorrect for use in MSTest projects.

Hi Mark,

Thanks for reporting this issue to Katalon team. I have logged a ticket and will inform the dev team to investigate asap.

Thanks again,
Liam


#9

Hi Mark,

Great news!
Katalon team has fixed this issue. Please update your add-on.

Please let us know if you have any further questions or concerns,

Thank you for using KAR,
Liam


#10

@Liam B Hi Liam, I can confirm that the exported code now uses the correct template. Thanks for such a rapid solution.


#11

@Mark_Gibson, we are reviewing Katalon Recorder source code before making it open-source. Could you specify the license of the script you sent us?


#12

If I remember I just copied and modified some code from Selenium IDE.
I’m quite happy to go with whatever license you decide on with Katalon Recorder


#13

The source code has been published.