WebDriver - element is not clickable Chrome

前端 未结 8 1131
攒了一身酷
攒了一身酷 2021-02-04 10:56

I have following problem. I run test on Firefox and Chrome. On Firefox test run correctly but on Chrome SauceLabs give a message:

unknown error: Element is not          


        
8条回答
  •  隐瞒了意图╮
    2021-02-04 11:23

    I am assuming that you have the correct element you need, ie the XPath is correct. Here are few ways out:

    1. Try to Click on the parent element instead.
    2. Try .Submit() instead of .Click()
    3. Try to execute the JavaScript that will be executed on the OnClick event of the element you are trying to click.

    I have used the 3rd way with success all the time.

    Another one

    1. Do a .SendKeys(Keys.Enter) on that element (or a Space key)

提交回复
热议问题