我们可以在剧作家中为GEO位置运行基于IP的测试吗?
剧作家使用纬度和经度提供地理位置支持,但是它仅更改客户端的位置。在我的用例中,我需要IP地址需求以及API和URL,因此请根据IP地址获取和渲染内容
Playwright provides geolocation support using latitude and longitude, however it only changes location at client. In my use-case, I need IP address needs along with APIs and urls so fetch and render content based on IP address
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
剧作家的地理位置支持是关于模拟客户端的地理位置的,如下文:
由于您无法控制服务器,因此无法更改服务器的地理位置。您唯一可以做的就是模拟服务器响应,但是这样您就不会测试实际的服务器行为,这似乎是您想要的。
Playwright geolocation support is about emulating the geographic location of the client, as diplayed below:
It is not possible to change the geolocation of the server, since you don't have control over the server. The only thing you can do is mock the server response, but that way you're not testing the actual server behavior, which seems to be what you want.