Closed icecat89 closed 3 weeks ago
DesiredCapabilities
can be thought of as just a name space 🙃, you can use Capabilities for if you want to return the actual capabilities, just do DesiredCapabilities::chrome().into()
and so on
otherwise if you want to chnage options generically on many Capabilities I would suggest just making your enum that implents from Capabilities
enum Caps {
Chrome(ChromeCapabilities),
Edge(EdgeCapabilities),
FireFox (FirefoxCapabilities),
}
// impl logic for caps here
impl From<Caps> for Capabilities {
fn from(value: Caps) {
match value {
Chrome(c) => c.into(),
Edge(c) => c.into(),
FireFox(c) => c.into()
}
}
}
and sorry for the late response I was busy with midterms
no problem at all, i already solve it )) thank u man let me ur contact method if u can )) would be really thankfull ^^
I used this function to return the type of browser as
DesiredCapabilities
, using the CLI command, means the user will choose which browser will be used:the problem is that i got an error:
@Vrtgs , I searched everywhere to solve this error, but i couldn't, please, if you have an idea just tell me tho and thanks ^^