Hello, I executed it. The xpath is ok. All tags are under . It should work. But, each time it is giving the same error. Katalon cannot find the element: {“method”:“xpath”,“selector”:“id(‘mlist’)/tbody”}
“Exceptions | Selenium” says that a possible cause is the incorrect xPath in terms of invalid characters.
Questions: How can it be possible that the xpath may be incorrect when it is identifying each row in the table? Is it because the table is in an iframe that the xpath needs a modification? If so, then what is the modification?
No. Within the if statement, the condition (the phrase within the parenthesis) has to be equal to a boolean. So, if the switchToFrame() would be true, then our table code would be run. If it would be false, the table code does not run.
If you want to print out the value, then you have to do something different. Maybe like (I added the FailureHandling part to the switchToFrame() statement so you need to add the FailureHandling import to the top):
Now the problem is with the xpath(“id(‘mlist’)/tbody”).
Do you think before entering in the table, it should switch to DefaultContent and then again to the iframe?
You have your target URL in your hand, but others don’t.
Please understand that it is very difficult (impossible, I would say) for others on the forum to debug your Test Object and script without having the target HTML in hand.
If possible, please save your target web page into a single MHTML file using Chrome DevTool, and share the file here.
In Chrome browser having your target HTML opened, if you right click on a page, in a drop down menu you can choose “Save as” which calls up a dialog where you can select to “save as, Webpage, Single file”. Do it and you will get a file. That’s a Mime HTML file.
If you could share the MHTML file, people on the forum will be able to reproduce your target HTML live on our PC without immediate internet connection to its URL. We will be able to hack for some solution.
If you could not share it, sorry I would not be able to help you any more.
@kazurayam Hello. I appreciate your help and that I am learning a lot!
I have the target URL. Voluntarily I would share the Mime HTML file if it was my property. But, it’s unlawful. What I can do is put all the screenshots of the iframe’s HTML as they are in a word doc.
Will it be ok?
I would tell you how you can provide the best information, which is lawful, for communication in the forum.
You should look at the target HTML source code very carefully. And then, you should create a “mimic of the target page” manually by your hand, and try to reproduce your current problem with the mimic.
You should write a new HTML file manually locally which “works” like the original target Web page. You can refer to the original page while trimming “lawfully sensitive” portions off. You should write a test script against the hand-made target HTML.
Once you could reproduce the problem with the mimic, you can share the mimic HTML, which is lawfully secure to share, to others, can’t you?
Once you could reproduce the problem with the mimic, I believe, you would find a solution for yourself. You would not need asking for help to us any more.
@kazurayam@grylion54 Again thanks for all your efforts to help me get it working. I do understand that I have to make things easy for you to be able to help me. Many things I didn’t know, i am now aware thanks to you. I have the MHTML file.