硒测试,用于两个用户之间的交互 [英] Selenium test for interaction between two users

查看:53
本文介绍了硒测试,用于两个用户之间的交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用硒测试用户聊天系统.目前,我通过打开两个浏览器来手动执行此操作,分别使用不同的测试用户登录,并在两个用户之间发送消息.

I need to test user chat system with selenium. Currently I do that manually by opening two browsers, logging in each with different test user, and send messages between the two users.

我的问题是我如何使用硒将其自动化?

My question is how I can automate that with selenium?

推荐答案

实际上我从未尝试过,但是我想您可以轻松拥有两个不同的WebDriver实例:

Actually I never tried that, but I guess you can easily have two different instances of WebDriver:

 driver1 = new FirefoxDriver();
 driver2 = new FirefoxDriver();

IMHO应该运行两个不同的Firefox浏览器,以便您可以在其中玩耍.但是,我再也没有尝试过这种方法,所以我可能是错的

should IMHO run two different Firefox browsers where you can play around. But again, I never tried this approach, so I might be wrong

这篇关于硒测试,用于两个用户之间的交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆