Forum Discussion
Hi wynfranc100 !
What type of error are you encountering when running this sample code? If you could post a screenshot that would help us to determine where the issue may lie here.
- wynfranc1003 years agoOccasional Contributor
unable to connect to remote server
- wynfranc1003 years agoOccasional Contributor
and I can connect to localhost from the browser manually
- npaisley3 years agoStaff
Hi wynfranc100 ,
Thank you for the error message.
I see it is trying to connect to a Remote Browser, such as a cloud browser within CrossBrowserTesting. Although the code sample contains 'Browsers.RemoteItem', it will return a 'local browser' operation in the logs.
May you provide your full script so that we can take a look? I suspect there is a switch over that is incomplete in your script somewhere. Such as if you sometimes alter your script to switch from using CBT to a local browser.
For instance this is what the log contains when running just the above code sample;
- wynfranc1003 years agoOccasional Contributor
it is the same thing. My real tests are failing so I tried with a simple test and is not working. are there any prerequisites to do before running locally? just wondering if that changed? or the command itself is broken?
function Test_Chrome_Headless()
{
var server = "localhost";
var capabilities = {
browserName: "chrome",
screenResolution: "1920x1080"
};var url = "https://services.smartbear.com/samples/TestComplete15/smartstore/";
Browsers.RemoteItem(server, capabilities).Run(url);
}
Related Content
- 2 years ago
- 2 years ago
- 3 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago