We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
naturalWidth
Json("Unexpected value for property: Number(450)")
The code to get prop naturalWidth of img element:
let question_img = question_img_div.find(By::Css("img")).await?; let origin_width= question_img.prop("naturalWidth").await?;
The error is:
Error: Json("Unexpected value for property: Number(450)")
Goto the code of prop function:
pub async fn prop(&self, name: impl Into<String>) -> WebDriverResult<Option<String>> { let resp = self .handle .cmd(Command::GetElementProperty(self.element_id.clone(), name.into())) .await?; match resp.value()? { Value::String(v) => Ok(Some(v)), Value::Bool(b) => Ok(Some(b.to_string())), Value::Null => Ok(None), v => Err(WebDriverError::Json(format!("Unexpected value for property: {:?}", v))), } }
It's not consider Number type. It's a bug? or the way to use is not correct?
Number
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The code to get prop
naturalWidth
of img element:The error is:
Goto the code of prop function:
It's not consider
Number
type.It's a bug? or the way to use is not correct?
The text was updated successfully, but these errors were encountered: