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

Select / option is not found inside an iframe #170

Closed
lokki opened this issue Oct 13, 2014 · 5 comments
Closed

Select / option is not found inside an iframe #170

lokki opened this issue Oct 13, 2014 · 5 comments

Comments

@lokki
Copy link

lokki commented Oct 13, 2014

Hi

url "http://lefthandedgoat.github.io/canopy/testpages/iframe1"
"#item_list" << "2"

fails for me with latest canopy nuget
It seems like it can find the select, but cannot find an option either by text or by value when it's inside an iframe. Without the iframe everything works

@sergey-tihon
Copy link
Collaborator

Have you changed optimizeBySkippingIFrameCheck?
https://github.com/lefthandedgoat/canopy/blob/master/src/canopy/configuration.fs#L23

@lokki
Copy link
Author

lokki commented Oct 13, 2014

No, a brand new project with that one test. No configuration changes. Using Firefox if that matters. I'm able to work around this by just using Selenium

SelectElement(element cssSelector).SelectByValue(value)

In my other tests I noticed that canopy works fine when both value and text in option tag are the same, otherwise it fails for me

@lefthandedgoat
Copy link
Owner

Thanks lokki, I will look into it tonight.

@lefthandedgoat
Copy link
Owner

This one was tough. It was finding the select in the iFrame, then trying to find the element by value and by text inside the select. canopy automatically tries to leave frames if it can't find an element. It was doing this which was breaking the instance of the select element I had making it 'stale'. I fixed this by improving the selector to get value/text in one try and it resolved the issue.

Good find, sorry it took so long to resolve.

lefthandedgoat added a commit that referenced this issue Oct 20, 2014
@lefthandedgoat
Copy link
Owner

New version published to nuget. Let me know if you have anymore issues!

Thanks!

https://www.nuget.org/packages/canopy/0.9.17

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

No branches or pull requests

3 participants