Hi team
A PDF will open as an embedded in an internet explorer and need to select a List item in that PDF. When i do the spy its identifying as List Item only. But when i try to select that listitem throwing an error message as
"Action 'select' failed on element '{ListItem:Lawful Permanent Resident}'.
Element is not valid.
Error HRESULT E_FAIL has been returned from a call to a COM component
the code i tried is
var Itemcnt = CmplHire.Lst_ResidenceStatus.Items
For (int iter1=0; iter1<Itemcnt .Count;iter1++)
{
if (Itemcnt [iter1].Text == "Lawful Permanent Resident")
{
Itemcnt [iter1].Select();
}
}
Attached is the Snapshot of the Repository and also the screenshot of the application
Unable to Select the ListItem in a PDF embedded in IE
Unable to Select the ListItem in a PDF embedded in IE
You do not have the required permissions to view the files attached to this post.
Re: Unable to Select the ListItem in a PDF embedded in IE
Hi,
Could you please provide the problematic PDF? My guess is that you are trying to retrieve the item from collapsed listbox, which may be the reason of your problem. I think you will have to expand the listbox (click on it) before you try to read/select its items?
Could you please provide the problematic PDF? My guess is that you are trying to retrieve the item from collapsed listbox, which may be the reason of your problem. I think you will have to expand the listbox (click on it) before you try to read/select its items?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Unable to Select the ListItem in a PDF embedded in IE
odklizec wrote:Hi,
Could you please provide the problematic PDF? My guess is that you are trying to retrieve the item from collapsed listbox, which may be the reason of your problem. I think you will have to expand the listbox (click on it) before you try to read/select its items?
Hi
Thanks for the reply. I tried that approach also . i added the below extra statements above the select code
CmplHire.Lst_ResidenceStatus.Focus();
CmplHire.Lst_ResidenceStatus.Click();
Even after that also its not worked
Re: Unable to Select the ListItem in a PDF embedded in IE
I still think it's because of invalid state of the listbox? Unfortunately, it's hard to suggest something reliable without sample PDF
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Unable to Select the ListItem in a PDF embedded in IE
Attached is the Sample PDF. Kindly look at it and provide me some solutionodklizec wrote:I still think it's because of invalid state of the listbox? Unfortunately, it's hard to suggest something reliable without sample PDF
Re: Unable to Select the ListItem in a PDF embedded in IE
I'm afraid, you forgot to attach the sample file?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Unable to Select the ListItem in a PDF embedded in IE
i am not able to attach the PDF file getting an error message as "The extension pdf is not allowed."nivasd16 wrote:Attached is the Sample PDF. Kindly look at it and provide me some solutionodklizec wrote:I still think it's because of invalid state of the listbox? Unfortunately, it's hard to suggest something reliable without sample PDF
Re: Unable to Select the ListItem in a PDF embedded in IE
send me your Email id i will send the pdf as an attachmentnivasd16 wrote:i am not able to attach the PDF file getting an error message as "The extension pdf is not allowed."nivasd16 wrote:Attached is the Sample PDF. Kindly look at it and provide me some solutionodklizec wrote:I still think it's because of invalid state of the listbox? Unfortunately, it's hard to suggest something reliable without sample PDF
Re: Unable to Select the ListItem in a PDF embedded in IE
Just zip it Zip archive is allowed.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Unable to Select the ListItem in a PDF embedded in IE
Attached the file.Unzip it and open that file with PDF , the image looks doc but need to open in PDfodklizec wrote:Just zip it Zip archive is allowed.
You do not have the required permissions to view the files attached to this post.
Re: Unable to Select the ListItem in a PDF embedded in IE
Hi,
Unfortunately, I'm not able to track the individual PDF elements with Spy. I'm using Ranorex 6.1.1 and I see you created your snapshot with 5.4.6. So there is a little chance something PDF-related got broken in 6.1.1? Which means I'm not able to help you right now.
BTW, what version of acrobat reader do you use?
Unfortunately, I'm not able to track the individual PDF elements with Spy. I'm using Ranorex 6.1.1 and I see you created your snapshot with 5.4.6. So there is a little chance something PDF-related got broken in 6.1.1? Which means I'm not able to help you right now.
BTW, what version of acrobat reader do you use?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Unable to Select the ListItem in a PDF embedded in IE
Hi nivasd16,
I'm afraid I couldn't access individual elements either. But basically, PDF object recognition seems to work on my machine (Ranorex 6.1.1).
I could see from your snapshot that you embedded the PDF document in a web page. Did you make any special configuration to make the PDF objects accessible? Could you describe how you embedded the PDF in your web page? I tried embedding it via an iframe, but the result is the same like when tracking it from the PDF reader directly.
I'm afraid I couldn't access individual elements either. But basically, PDF object recognition seems to work on my machine (Ranorex 6.1.1).
I could see from your snapshot that you embedded the PDF document in a web page. Did you make any special configuration to make the PDF objects accessible? Could you describe how you embedded the PDF in your web page? I tried embedding it via an iframe, but the result is the same like when tracking it from the PDF reader directly.