I have a script which I intend to do following tasks,
- Click on Windows.
- Type “Google Chrome”, ENTER.
- Select Address bar.
- Enter a URL, ENTER.
I used “Typetext windowsKey” and “Typetext windowsAltKey, “d”” commands to click on Windows and selecting the address bar.
The script works fine on one SUT, but behaves differently on another SUT. Both Windows 7 machines.
Suggestions/ Solutions welcome.
How does it behave differently? You’ll need to be more specific about what is happening.
The Following code snippet to hit windows button and open Google chrome works on one windows machine but doesn’t work on the other windows machine.
Typetext “Google Chrome”, ENTER
Sometimes, the same code clicks on the Google Chrome shortcut on the desktop.
If I remove the shortcut on the desktop, it will open up some other file or application.
Just to verify, I did the same operation manually on the SUT and there is no weird behavior.
It looks as if the same commands are performing different operations on different machines. Not sure if I am missing any settings on the SUT side.
[quote=“suman.rayabaram”]The Following code snippet to hit windows button and open Google chrome works on one windows machine but doesn’t work on the other windows machine.
Typetext “Google Chrome”, ENTER[/quote]
WindowsDown and WindowsUp are not commands or keywords – they would be typing the literal strings “WindowsDown” and “WindowsUp”, so they shouldn’t be doing anything at all, except maybe selecting an icon on the screen. This is also the reason for the behavior described in your second post. What you are seeing is just what happens when you have focus on the desktop and you start pressing keys. Windows Explorer selects the icon/shortcut that starts with the character or characters you are typing. When you have “Google Chrome” on the screen, it gets selected when you type those words, since your code to open the Start Menu wasn’t doing anything.
I wouldn’t think you’d need the Wait in there, so the code should be something like this:
WaitFor 4, "All Programs" // capture an image of this or use a text search
TypeText "Google Chrome" & return