Frame

Struct Frame 

Source
pub(crate) struct Frame {
    channel: ChannelOwner,
    parent_frame: Option<Weak<Frame>>,
    var: Mutex<Variable>,
    tx: Mutex<Option<Sender<Evt>>>,
}

Fields§

§channel: ChannelOwner§parent_frame: Option<Weak<Frame>>§var: Mutex<Variable>§tx: Mutex<Option<Sender<Evt>>>

Implementations§

Source§

impl Frame

Source

pub(crate) fn try_new( ctx: &Context, channel: ChannelOwner, ) -> Result<Self, Error>

Source

pub(crate) fn hook_created(&self, this: Weak<Frame>) -> Result<(), Error>

Source

pub(crate) async fn goto( &self, args: GotoArgs<'_, '_>, ) -> Result<Option<Weak<Response>>, Arc<Error>>

Source

pub(crate) async fn click(&self, args: ClickArgs<'_>) -> Result<(), Arc<Error>>

Source

pub(crate) async fn dblclick( &self, args: ClickArgs<'_>, ) -> Result<(), Arc<Error>>

Source

pub(crate) async fn tap(&self, args: TapArgs<'_>) -> Result<(), Arc<Error>>

Source

pub(crate) async fn fill( &self, args: FillArgs<'_, '_>, ) -> Result<(), Arc<Error>>

Source

pub(crate) async fn focus( &self, selector: &str, timeout: Option<f64>, ) -> Result<(), Arc<Error>>

Source

pub(crate) async fn text_content( &self, selector: &str, timeout: Option<f64>, ) -> Result<Option<String>, Arc<Error>>

Source

pub(crate) async fn inner_text( &self, selector: &str, timeout: Option<f64>, ) -> Result<String, Arc<Error>>

Source

pub(crate) async fn inner_html( &self, selector: &str, timeout: Option<f64>, ) -> Result<String, Arc<Error>>

Source

pub(crate) async fn get_attribute( &self, selector: &str, name: &str, timeout: Option<f64>, ) -> Result<Option<String>, Arc<Error>>

Source

pub(crate) async fn query_selector( &self, selector: &str, ) -> Result<Option<Weak<ElementHandle>>, Arc<Error>>

Source

pub(crate) async fn query_selector_all( &self, selector: &str, ) -> Result<Vec<Weak<ElementHandle>>, Arc<Error>>

Source

pub(crate) async fn frame_element( &self, ) -> Result<Weak<ElementHandle>, Arc<Error>>

Source

pub(crate) async fn wait_for_selector( &self, args: WaitForSelectorArgs<'_>, ) -> Result<Option<Weak<ElementHandle>>, Arc<Error>>

Source

pub(crate) async fn title(&self) -> Result<String, Arc<Error>>

Source

pub(crate) async fn type( &self, args: TypeArgs<'_, '_>, ) -> Result<(), Arc<Error>>

Source

pub(crate) async fn press( &self, args: PressArgs<'_, '_>, ) -> Result<(), Arc<Error>>

Source

pub(crate) async fn hover(&self, args: HoverArgs<'_>) -> Result<(), Arc<Error>>

Source

pub(crate) async fn is_checked( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>

Source

pub(crate) async fn is_disabled( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>

Source

pub(crate) async fn is_editable( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>

Source

pub(crate) async fn is_enabled( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>

Source

pub(crate) async fn is_hidden( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>

Source

pub(crate) async fn is_visible( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>

Source

pub(crate) async fn content(&self) -> Result<String, Arc<Error>>

Source

pub(crate) async fn set_content( &self, args: SetContentArgs<'_>, ) -> Result<(), Arc<Error>>

Source

pub(crate) async fn check(&self, args: CheckArgs<'_>) -> Result<(), Arc<Error>>

Source

pub(crate) async fn uncheck( &self, args: CheckArgs<'_>, ) -> Result<(), Arc<Error>>

Source

pub(crate) async fn add_script_tag( &self, args: AddScriptTagArgs<'_, '_, '_>, ) -> Result<Weak<ElementHandle>, Arc<Error>>

Source

pub(crate) async fn add_style_tag( &self, content: &str, url: Option<&str>, ) -> Result<Weak<ElementHandle>, Arc<Error>>

Source

pub(crate) async fn eval<U>(&self, expression: &str) -> Result<U, Arc<Error>>

Source

pub(crate) async fn evaluate<T, U>( &self, expression: &str, arg: Option<T>, ) -> Result<U, Arc<Error>>

Source

async fn evaluate_handle<T>( &self, expression: &str, arg: Option<T>, ) -> Result<Handle, Arc<Error>>
where T: Serialize,

Source

pub(crate) async fn evaluate_element_handle<T>( &self, expression: &str, arg: Option<T>, ) -> Result<Weak<ElementHandle>, Arc<Error>>
where T: Serialize,

Source

pub(crate) async fn evaluate_js_handle<T>( &self, expression: &str, arg: Option<T>, ) -> Result<Weak<JsHandle>, Arc<Error>>
where T: Serialize,

Source

pub(crate) async fn evaluate_on_selector<T, U>( &self, selector: &str, expression: &str, arg: Option<T>, ) -> Result<U, Arc<Error>>

Source

pub(crate) async fn evaluate_on_selector_all<T, U>( &self, selector: &str, expression: &str, arg: Option<T>, ) -> Result<U, Arc<Error>>

Source

pub(crate) async fn dispatch_event<T>( &self, selector: &str, type: &str, event_init: Option<T>, ) -> Result<(), Arc<Error>>
where T: Serialize,

Source

pub(crate) async fn select_option( &self, args: SelectOptionArgs<'_>, ) -> Result<Vec<String>, Arc<Error>>

Source

pub(crate) async fn set_input_files( &self, args: SetInputFilesArgs<'_>, ) -> Result<(), Arc<Error>>

Source

pub(crate) async fn wait_for_function( &self, args: WaitForFunctionArgs<'_>, ) -> Result<Weak<JsHandle>, Arc<Error>>

Source§

impl Frame

Source

pub(crate) fn url(&self) -> String

Source

pub(crate) fn name(&self) -> String

Source

pub(crate) fn page(&self) -> Option<Weak<Page>>

Source

pub(crate) fn set_page(&self, page: Weak<Page>)

Source

pub(crate) fn parent_frame(&self) -> Option<Weak<Frame>>

Source

pub(crate) fn child_frames(&self) -> Vec<Weak<Frame>>

Source

pub(crate) fn add_child_frames(&self, child: Weak<Frame>)

Source

fn on_navigated( &self, ctx: &Context, params: Map<String, Value>, ) -> Result<(), Error>

Source

fn on_load_state(&self, params: Map<String, Value>) -> Result<(), Error>

Trait Implementations§

Source§

impl Debug for Frame

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventEmitter for Frame

Source§

type Event = Evt

Source§

fn tx(&self) -> Option<Sender<Self::Event>>

Source§

fn set_tx(&self, tx: Sender<Self::Event>)

Source§

fn new_tx(&self) -> (Sender<Self::Event>, Receiver<Self::Event>)

Source§

fn subscribe_event(&self) -> Receiver<Self::Event>

Source§

fn emit_event<E: Into<Self::Event>>(&self, e: E)

Source§

impl RemoteObject for Frame

Source§

fn channel(&self) -> &ChannelOwner

Source§

fn channel_mut(&mut self) -> &mut ChannelOwner

Source§

fn handle_event( &self, ctx: &Context, method: Str<Method>, params: Map<String, Value>, ) -> Result<(), Error>

Source§

fn guid(&self) -> &S<Guid>

Source§

fn context(&self) -> Result<Arc<Mutex<Context>>, Error>

Auto Trait Implementations§

§

impl !Freeze for Frame

§

impl RefUnwindSafe for Frame

§

impl Send for Frame

§

impl Sync for Frame

§

impl Unpin for Frame

§

impl UnwindSafe for Frame

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.