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
impl Frame
pub(crate) fn try_new( ctx: &Context, channel: ChannelOwner, ) -> Result<Self, Error>
pub(crate) fn hook_created(&self, this: Weak<Frame>) -> Result<(), Error>
pub(crate) async fn goto( &self, args: GotoArgs<'_, '_>, ) -> Result<Option<Weak<Response>>, Arc<Error>>
pub(crate) async fn click(&self, args: ClickArgs<'_>) -> Result<(), Arc<Error>>
pub(crate) async fn dblclick( &self, args: ClickArgs<'_>, ) -> Result<(), Arc<Error>>
pub(crate) async fn tap(&self, args: TapArgs<'_>) -> Result<(), Arc<Error>>
pub(crate) async fn fill( &self, args: FillArgs<'_, '_>, ) -> Result<(), Arc<Error>>
pub(crate) async fn focus( &self, selector: &str, timeout: Option<f64>, ) -> Result<(), Arc<Error>>
pub(crate) async fn text_content( &self, selector: &str, timeout: Option<f64>, ) -> Result<Option<String>, Arc<Error>>
pub(crate) async fn inner_text( &self, selector: &str, timeout: Option<f64>, ) -> Result<String, Arc<Error>>
pub(crate) async fn inner_html( &self, selector: &str, timeout: Option<f64>, ) -> Result<String, Arc<Error>>
pub(crate) async fn get_attribute( &self, selector: &str, name: &str, timeout: Option<f64>, ) -> Result<Option<String>, Arc<Error>>
pub(crate) async fn query_selector( &self, selector: &str, ) -> Result<Option<Weak<ElementHandle>>, Arc<Error>>
pub(crate) async fn query_selector_all( &self, selector: &str, ) -> Result<Vec<Weak<ElementHandle>>, Arc<Error>>
pub(crate) async fn frame_element( &self, ) -> Result<Weak<ElementHandle>, Arc<Error>>
pub(crate) async fn wait_for_selector( &self, args: WaitForSelectorArgs<'_>, ) -> Result<Option<Weak<ElementHandle>>, Arc<Error>>
pub(crate) async fn title(&self) -> Result<String, Arc<Error>>
pub(crate) async fn type( &self, args: TypeArgs<'_, '_>, ) -> Result<(), Arc<Error>>
pub(crate) async fn press( &self, args: PressArgs<'_, '_>, ) -> Result<(), Arc<Error>>
pub(crate) async fn hover(&self, args: HoverArgs<'_>) -> Result<(), Arc<Error>>
pub(crate) async fn is_checked( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>
pub(crate) async fn is_disabled( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>
pub(crate) async fn is_editable( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>
pub(crate) async fn is_enabled( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>
pub(crate) async fn is_visible( &self, selector: &str, timeout: Option<f64>, ) -> Result<bool, Arc<Error>>
pub(crate) async fn content(&self) -> Result<String, Arc<Error>>
pub(crate) async fn set_content( &self, args: SetContentArgs<'_>, ) -> Result<(), Arc<Error>>
pub(crate) async fn check(&self, args: CheckArgs<'_>) -> Result<(), Arc<Error>>
pub(crate) async fn uncheck( &self, args: CheckArgs<'_>, ) -> Result<(), Arc<Error>>
pub(crate) async fn add_script_tag( &self, args: AddScriptTagArgs<'_, '_, '_>, ) -> Result<Weak<ElementHandle>, Arc<Error>>
pub(crate) async fn add_style_tag( &self, content: &str, url: Option<&str>, ) -> Result<Weak<ElementHandle>, Arc<Error>>
pub(crate) async fn eval<U>(&self, expression: &str) -> Result<U, Arc<Error>>where
U: DeserializeOwned,
pub(crate) async fn evaluate<T, U>(
&self,
expression: &str,
arg: Option<T>,
) -> Result<U, Arc<Error>>where
T: Serialize,
U: DeserializeOwned,
async fn evaluate_handle<T>(
&self,
expression: &str,
arg: Option<T>,
) -> Result<Handle, Arc<Error>>where
T: Serialize,
pub(crate) async fn evaluate_element_handle<T>(
&self,
expression: &str,
arg: Option<T>,
) -> Result<Weak<ElementHandle>, Arc<Error>>where
T: Serialize,
pub(crate) async fn evaluate_js_handle<T>(
&self,
expression: &str,
arg: Option<T>,
) -> Result<Weak<JsHandle>, Arc<Error>>where
T: Serialize,
pub(crate) async fn evaluate_on_selector<T, U>(
&self,
selector: &str,
expression: &str,
arg: Option<T>,
) -> Result<U, Arc<Error>>where
T: Serialize,
U: DeserializeOwned,
pub(crate) async fn evaluate_on_selector_all<T, U>(
&self,
selector: &str,
expression: &str,
arg: Option<T>,
) -> Result<U, Arc<Error>>where
T: Serialize,
U: DeserializeOwned,
pub(crate) async fn dispatch_event<T>(
&self,
selector: &str,
type: &str,
event_init: Option<T>,
) -> Result<(), Arc<Error>>where
T: Serialize,
pub(crate) async fn select_option( &self, args: SelectOptionArgs<'_>, ) -> Result<Vec<String>, Arc<Error>>
pub(crate) async fn set_input_files( &self, args: SetInputFilesArgs<'_>, ) -> Result<(), Arc<Error>>
pub(crate) async fn wait_for_function( &self, args: WaitForFunctionArgs<'_>, ) -> Result<Weak<JsHandle>, Arc<Error>>
Source§impl Frame
impl Frame
pub(crate) fn url(&self) -> String
pub(crate) fn name(&self) -> String
pub(crate) fn page(&self) -> Option<Weak<Page>>
pub(crate) fn set_page(&self, page: Weak<Page>)
pub(crate) fn parent_frame(&self) -> Option<Weak<Frame>>
pub(crate) fn child_frames(&self) -> Vec<Weak<Frame>>
pub(crate) fn add_child_frames(&self, child: Weak<Frame>)
fn on_load_state(&self, params: Map<String, Value>) -> Result<(), Error>
Trait Implementations§
Source§impl EventEmitter for Frame
impl EventEmitter for Frame
type Event = Evt
fn tx(&self) -> Option<Sender<Self::Event>>
fn set_tx(&self, tx: Sender<Self::Event>)
fn new_tx(&self) -> (Sender<Self::Event>, Receiver<Self::Event>)
fn subscribe_event(&self) -> Receiver<Self::Event>
fn emit_event<E: Into<Self::Event>>(&self, e: E)
Source§impl RemoteObject for Frame
impl RemoteObject for Frame
fn channel(&self) -> &ChannelOwner
fn channel_mut(&mut self) -> &mut ChannelOwner
fn handle_event( &self, ctx: &Context, method: Str<Method>, params: Map<String, Value>, ) -> Result<(), Error>
fn guid(&self) -> &S<Guid>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more