使用带有Scala保留字的Java库

时间:2021-10-14 19:37:13

I'm using an external library written in Java (Selenium). One of the function calls has the signature type(String, String), and I keep getting compiler errors when trying to call it from Scala, that is:

我正在使用用Java编写的外部库(Selenium)。其中一个函数调用具有签名类型(String,String),并且在尝试从Scala调用时,我一直遇到编译器错误,即:

selenium.type("ab","abc")

Is there a workaround for this issue?

这个问题有解决方法吗?

1 个解决方案

#1


45  

selenium.`type`("ab","abc")

#1


45  

selenium.`type`("ab","abc")