我正在为一个希望我进行 selenium/junit 测试的客户工作,但整个用户界面没有显示任何 html 代码的 id 或页面的标题,只是像“欢迎来到......”这样的内容,如何例如,您要检查一个是在主页上还是在登录页面上?
这是一个html示例:
<div class="site-body m-welcome" data-module="welcome">
<div class="inner">
<h1 class="starred dark"><span>Welcome to ...</span></h1>
<div class="choices">
<div class="choice">
<a href="http://www.alink/account/validate/driver" class="btn btn-primary">Become a xxxxx</a>
</div>
<span class="or"><span>Or</span></span>
<form action="http://www.alink/welcome" method="post" class="choice" data-response-type="json">
<input type="text" name="plate_number" id="car_plate_validation_plate_number" value="" maxlength="8" class="plate required numberplate" placeholder="Enter number plate">
<button type="submit" class="btn btn-primary">Become an yyyyy</button>
<div class="invalid-message inline-modal" data-behavior="modal">
<h1>Sorry - you are not eligible to join the company</h1>
<p>See <a href="#">am I eligile?</a> for full eligibility critera.</p>
</div>
</form>
</div>