Forum Discussion
@dmiscannon - that didn't change anything. I took the delay out of my code since it didn't change anything, anyways
@nishera - As I said above, it works when calling it by itself. Although, there's been a fun development today. If I try to call it from the main program, then run stand alone again, it fails. If I only run it stand alone, it runs with no problems.
@colin_mccrae - Honestly? I didn't even understand what that page said, so I am pretty sure I am not doing that.
It is not like it is anything that is complicated at all. It's a simple procedure:
- Right click to open the menu
- Click two check boxes
- Confirm the columns were removed
- Refresh the web page
- Confirm the columns are still removed
- Right click
- Click Refresh (to bring back all columns)
- Confirm all the columns appear again
I use a variable for the object path for all the items because when I originally had the problem, I thought it was because I moved the items in the name mapping tab. Regardless, I tried it with the full path with no change in behavior.
- Call it stand alone directly in the code, it works.
- Call it as a function call from the main prgram, it fails
- Call it stand alone from the project, it works
- Call it stand alone after the main code has run, it fails
- Include code to open the webpage inside the function, it fails
- Call it stand alone after a function to open the webpage, but before the main code from the project, it works
And it's only Tuesday *SIGH*
Where exactly in your 8 steps does it fail?
And what is the error it fails with?
Looking at the 8 steps, I'm not clear which bits are on the main page and which parts are on the popup? Also, is this a dialog type popup or some sort of modal popup window generated by the application?
From what you're saying, it does sound like an identification issue. Do any of the identification properties used to identify your problem object (and all it's parents all the way up the tree) look likely to be varying at runtime? Like they contain big longs strings of random looking characters or something?
- blbdt369 years agoContributor
@colin_mccrae - when it is failing, it fails when trying to find the first checkbox, so step 2. It fails with objects do not exist error.
Hopefully this will clear up the steps as to where the actions/checks occur
- Right click on main page to open the right click menu
- Click two check boxes on right click menu
- Confirm the columns were removed on main page
- Refresh the main web page
- Confirm the columns are still removed on the main page
- Right click on the main page to open the right click menu
- Click Refresh on the right click menu to bring back all columns on main page
- Confirm all the columns appear on main page
I think if it is an identification issue, it is a really funky one. I use the type and the Full name as the identification properties. That seems to work best for my page. Every time it fails, I use the Display Object Spy to confirm that the fields are still mapped as expected and they are. Every freaking time.
I think if it was something as simple as that, then it would always fail and not just when it was run with other code.
- Colin_McCrae9 years agoCommunity Hero
Weird.
Which object does it fail to identify? The checkbox itself or the menu container it lives in?
Are you able to verify the checkboxes? (Is the right click menu one that vanishes as soon as focus moved off the page ... if it is, the Point + Fix method should get it)
- blbdt369 years agoContributor
@colin_mccrae - Yea, I find weird things all the time - lol. It's why I've stuck with testing for so long! When I look at the error, it says that it can't find the direct parent of the checkbox.
The menu disappears as soon as the mouse is moved.
When I use the object spy, the checkbox shows the mapped name correctly.
I need to try this again, but our data system is down and the page isn't rendering correctly without the data.
- blbdt369 years agoContributor
Well, I was able to get back onto the webpage. I checked the Object Spy and it was mapped. I was able to highlight the checkbox from the name mapping tree (leaving the pointer where it was and using the keyboard to navigate).
It still wouldn't run in the main script. I have a line of code that was basically for refreshing the page
Browsers.Item(btChrome).Navigate("http://mywebsite");
I decided to try to run the script without it, but still calling the broken function. IT WORKED! I don't know why that line was messing things up, but it was. I replaced it with:
Browsers.Item(btChrome).Run("http://mywebsite");
And the whole thing worked!
WT....? Why would that cause things not to work? I even use Browsers.Item(btChrome).Navigate("http://mywebsite"); in the middle of the broken code to refresh the page (I couldn't find an acceptable refresh option)??
- Colin_McCrae9 years agoCommunity Hero
They should both end up in the same place so god only knows!
For refreshing, the browser should give you it as a method: http://support.smartbear.com/viewarticle/70831/
Or failing that, use the Keys method on the page to send it an [F5]. I've used both without any bother.
Related Content
- 9 years agojbiss
Recent Discussions
- 14 hours agoAivanitskiy
- 17 hours agonastester