我正在尝试单击一个按钮。我尝试了CSS,XPath和ClassName定位器。我收到一个“未知错误:元素在某个时刻不可点击”错误
WebDriverWait wait4 = new WebDriverWait (driver, 15);
wait4.until(ExpectedConditions.elementToBeClickable(By.cssSelector("#get-
quote-enabled > fieldset > a"))).click();
答案 0 :(得分:0)
尝试使用“操作”对象:
package com.Knight1111.FirstMod;
import com.Knight1111.FirstMod.proxy.CommonProxy;
import com.Knight1111.FirstMod.util.Reference;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
@Mod(modid = Reference.MOD_ID, name = Reference.NAME, version = Reference.VERSION)
public class Main {
@Instance
public static Main instance;
@SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.COMMON_PROXY_CLASS)
public static CommonProxy proxy;
@EventHandler
public static void PreInit(FMLPreInitializationEvent event)
{
}
@EventHandler
public static void Init(FMLInitializationEvent event)
{
}
@EventHandler
public static void PostInit(FMLPostInitializationEvent event)
{
}
}