如何根据C#Selenium中的AppSettings选择要执行的步骤DEF(或类)

发布于 2025-02-05 19:35:41 字数 285 浏览 3 评论 0原文

我目前正在对平台迁移进行一些测试,在该平台迁移中,我需要在一个平台上存在的软件上进行自动测试,并在将新平台迁移到另一个平台后在新平台上有效地执行相同的自动化。捕获量是,尽管该软件在功能上的有效相同(或非常相似),但XPATH,组件和标识符将有所不同。

为了解决这个问题,我想在平台A(PA)上为每个页面和平台B(PB)上的每个页面上一个课程。但是,我希望他们共享相同的功能文件(如果可能的话,甚至可能是步骤def),但是选择在运行时(在AppSettings.json)上测试的平台。

知道我如何在C#Selenium中这样做?

I'm currently doing some testing on a platform migration where I need to automate testing on software that exists on one platform, and effectively perform the same automation on the new platform once it's been migrated to the other platform. The catch is that although the software is effectively the same(or very similar) in functionality, the Xpaths, components and identifiers will be different.

To get around this I want to have a class for each page on platform A (pA) and a class for each page on platform B (pB). however, I want them to share the same feature files (and maybe even step defs if possible) but select which platform is being tested on at runtime (in Appsettings.Json).

any idea how i'd go about doing this in C# selenium?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文