Forum Discussion
What RunOptions have you provided?
What version of TC are you using?
Assuming there's no other Chrome browsers running, this should work without issues,
function Test()
{
Browsers.Item(btChrome).Run("https://www.w3schools.com/howto/tryit.asp?filename=tryhow_html_file_upload_button");
var browser = Sys.Browser("chrome");
var page = browser.Page("*");
var button = page.FindElement("#iframeResult").FindElement("#myFile");
Sys.HighlightObject(button);
var submit = page.FindElement("#iframeResult").FindElement("//input[@type='submit']");
Sys.HighlightObject(submit);
Sys.Browser("chrome").Close();
}
It launches the website, and highlights the buttons, then closes the Chrome browser.
- AMR01310 months agoContributor
Hi rraghvani
In my RunOptions line, I only provided the URL of the website I want to access.
Regarding my TestComplete version, I'm currently on 15.61.48.7.
- rraghvani10 months agoChampion Level 3
I've edited my response. Have a look at the code example I've attached.
- AMR01310 months agoContributor
Thanks for the response. I modified my script to highlight buttons as you did with yours and out of my 5 attempts, the first four attempts highlighted the buttons of my desired objects successfully while the last attempt didn't do anything (Did what I outlined in my initial post).
In your modified response, you mentioned it should work without issues as long as there weren't any other Chrome instances running. I decided to check my Task Manager and with my problem run, I have one main instance of Chrome
I also checked TestComplete and there are a couple of Chrome Host instances showing as well.
Related Content
- 10 years ago
- 12 years ago
- 2 years ago
Recent Discussions
- 20 hours ago
- 21 hours ago
- 5 days ago