warnings fix
This commit is contained in:
@@ -31,7 +31,7 @@ async fn main() -> Result<()> {
|
|||||||
|
|
||||||
// Find an element
|
// Find an element
|
||||||
println!("Finding h1 element...");
|
println!("Finding h1 element...");
|
||||||
let mut h1 = driver.find_element("h1").await?;
|
let h1 = driver.find_element("h1").await?;
|
||||||
let h1_text = h1.text().await?;
|
let h1_text = h1.text().await?;
|
||||||
println!("H1 text: {}\n", h1_text);
|
println!("H1 text: {}\n", h1_text);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use g3_computer_control::{create_controller, ComputerController};
|
use g3_computer_control::create_controller;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
use core_graphics::display::CGDisplay;
|
use core_graphics::display::CGDisplay;
|
||||||
use image::{ImageBuffer, RgbaImage};
|
use image::{ImageBuffer, RgbaImage};
|
||||||
use std::path::Path;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let display = CGDisplay::main();
|
let display = CGDisplay::main();
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// Suppress warnings from objc crate macros
|
||||||
|
#![allow(unexpected_cfgs)]
|
||||||
|
|
||||||
pub mod types;
|
pub mod types;
|
||||||
pub mod platform;
|
pub mod platform;
|
||||||
pub mod webdriver;
|
pub mod webdriver;
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ use core_foundation::base::TCFType;
|
|||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
use core_foundation::string::CFString;
|
use core_foundation::string::CFString;
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
use core_foundation::boolean::CFBoolean;
|
|
||||||
|
|
||||||
/// macOS Accessibility API controller using native APIs
|
/// macOS Accessibility API controller using native APIs
|
||||||
pub struct MacAxController {
|
pub struct MacAxController {
|
||||||
// Cache for application elements
|
// Cache for application elements
|
||||||
@@ -202,7 +199,7 @@ impl MacAxController {
|
|||||||
/// Activate (bring to front) an application
|
/// Activate (bring to front) an application
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
pub fn activate_app(&self, app_name: &str) -> Result<()> {
|
pub fn activate_app(&self, app_name: &str) -> Result<()> {
|
||||||
use cocoa::base::{id, nil};
|
use cocoa::base::id;
|
||||||
use objc::{class, msg_send, sel, sel_impl};
|
use objc::{class, msg_send, sel, sel_impl};
|
||||||
|
|
||||||
// Find the app
|
// Find the app
|
||||||
@@ -507,7 +504,6 @@ impl MacAxController {
|
|||||||
/// Type text into the currently focused element (uses system text input)
|
/// Type text into the currently focused element (uses system text input)
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
pub fn type_text(&self, app_name: &str, text: &str) -> Result<()> {
|
pub fn type_text(&self, app_name: &str, text: &str) -> Result<()> {
|
||||||
use cocoa::appkit::NSPasteboard;
|
|
||||||
use cocoa::base::{id, nil};
|
use cocoa::base::{id, nil};
|
||||||
use cocoa::foundation::NSString;
|
use cocoa::foundation::NSString;
|
||||||
use objc::{class, msg_send, sel, sel_impl};
|
use objc::{class, msg_send, sel, sel_impl};
|
||||||
|
|||||||
Reference in New Issue
Block a user