Skip to content
New issue

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

Not able to get iframe details inside div #648

Closed
vipulsingh24 opened this issue Jul 7, 2022 · 3 comments
Closed

Not able to get iframe details inside div #648

vipulsingh24 opened this issue Jul 7, 2022 · 3 comments
Labels
question Questions related to rod

Comments

@vipulsingh24
Copy link

Rod Version: v0.107.3

The code to demonstrate your question

el := page.MustElement("#botmanWidgetRoot > div > div:nth-child(2)")
pF := el.MustElement("#chatBotManFrame").MustFrame()

And the HTML source code looks like,

<html>
	<head>
	<body>
	<div>
	<script>
	<iframe>
	<div id ="widgetRoot">
		<div>
			<div>
				<iframe> // Need to access this iframe
					<document>
					<html>
						<input> // add text to this input field.
</html>

What you got

[Recovery from panic] {"time": "2022-07-07T14:38:34.573+0530", "error": "runtime error: invalid memory address or nil pointer dereference"

@vipulsingh24 vipulsingh24 added the question Questions related to rod label Jul 7, 2022
@rod-robot
Copy link

Please fix the format of your markdown:

3 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## The code to demonstrate your question"]
8 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"]
8 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
25 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## What you got"]
28 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]

generated by check-issue

@ysmood
Copy link
Member

ysmood commented Jul 7, 2022

Have you checked this #548?

@vipulsingh24
Copy link
Author

Hey, @ysmood thanks for the reply this issue is solved by adding WaitIdle before iframe

page := rod.New().ControlURL(u).MustConnect().MustPage(url)
defer page.MustClose()
page.WaitIdle(3)
pF := page.MustElement("#selector_name").MustFrame()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

3 participants