Expected condition failed: waiting for visibility of element located by By.xpath

前端 未结 3 1848
情书的邮戳
情书的邮戳 2021-01-13 03:16

I am trying to click on Sign in link on site alibaba.com

This is my test case:

public class TestCase {

    public static void main(String[] args) th         


        
3条回答
  •  甜味超标
    2021-01-13 03:40

    Here is the Answer to your Question:

    The xpath you have constructed //a[@data-val='ma_signin'] is not unique. The xpath matches with 3 nodes. If you want to click on Sign In button you can consider using this unique xpath:

    //div[@id='J_SC_header']//div[@class='sc-hd-row sc-hd-main']//a[@rel='nofollow'][@data-val='ma_signin']
    

提交回复
热议问题