I'm getting a System.NullReferenceException on the following:
HtmlSpan policySpan = kendoIE.ActiveBrowser.Find.ByContent<HtmlSpan>("p:foo");
And I know the span is there,
I've tried xpath, which is this : //html/body/div[2]/div/div/div[1]/div/ul/li[3]/ul/li[1]/span
and I still get the same exception.
Thanks,
Adam.
HtmlSpan policySpan = kendoIE.ActiveBrowser.Find.ByContent<HtmlSpan>("p:foo");
And I know the span is there,
I've tried xpath, which is this : //html/body/div[2]/div/div/div[1]/div/ul/li[3]/ul/li[1]/span
and I still get the same exception.
Thanks,
Adam.
7 Answers, 1 is accepted
0
Hello Adam,
What is "kendoIE"? If this is some parent element and you want to find the span withing this element you should use:
otherwise your code should look lie:
If the issue persists please send a screen shot of the DOM so we can assist you with the find expression.
Hope to hear from you soon.
Regards,
Boyan Boev
Telerik
What is "kendoIE"? If this is some parent element and you want to find the span withing this element you should use:
HtmlSpan policySpan = kendoIE.Find.ByContent<HtmlSpan>(
"p:foo"
);
otherwise your code should look lie:
HtmlSpan policySpan = ActiveBrowser.Find.ByContent<HtmlSpan>(
"p:foo"
);
If the issue persists please send a screen shot of the DOM so we can assist you with the find expression.
Hope to hear from you soon.
Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Adam
Top achievements
Rank 1
answered on 19 Jan 2015, 08:41 PM
the kendoIE was the manager reference, however I was able to find the element using a different reference :-) It just took some digging deeper.
Thanks,
Adam.
Thanks,
Adam.
0
Hello Adam,
Glad to hear that.
If you need further assistance please let us know.
Regards,
Boyan Boev
Telerik
Glad to hear that.
If you need further assistance please let us know.
Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
gmendez
Top achievements
Rank 1
answered on 09 Jun 2015, 05:12 PM
Hi Adam
I have a very similar issue, bu in my case with Find.ById<TControl>() as described here:
http://www.telerik.com/forums/unable-to-find-html-elements
What's very strange is that running my code against a website hosted in my local computer works, while testing on a remote testing machine over internet, doesn't.
I made sure that all the security requisites for runing tests on IE were correctly set. Both sites run using https. I can't find a difference...
Could you tell my how you resolved your problem?
Thanks,
Gonzalo
Could you
0
Hello Gonzalo,
Let's please continue the discussion in the other forum thread where my colleague Ivaylo is investigating the issue.
Thank you.
Regards,
Boyan Boev
Telerik
Let's please continue the discussion in the other forum thread where my colleague Ivaylo is investigating the issue.
Thank you.
Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
gmendez
Top achievements
Rank 1
answered on 12 Jun 2015, 12:14 PM
Yes, off course.
Thanks!
0
Hello Gonzalo,
Thank you!
Regards,
Boyan Boev
Telerik
Thank you!
Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings