question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to get selector in TeamCity

See original GitHub issue

Description

The following code works fine locally but on TeamCity it fails to locate the Username input. The site trying to load is limited to company’s intranet only. Everything works fine locally but fails on TeamCity. Is there any diagnostics command I can run to check what might be the issue?

Complete minimal example reproducing the issue

// Arrange
var websiteUrl = GetWebsiteUrl();
await page.GoToAsync(websiteUrl, WaitUntilNavigation.DOMContentLoaded);

const string usernameSelector = "#Username";            
var usernameInput = await page.GetElementBySelectorAsync(usernameSelector, selectorOptions);

// Act
...

// Assert
...

Expected behavior:

Should be able to get username selector

Actual behavior:

Throws timeout exception when not able to find username input:

PuppeteerSharp.WaitTaskTimeoutException : waiting for selector '#Username' failed: timeout 60000 ms exceeded

Versions

  • Which version of PuppeteerSharp are you using? 2.0.3
  • Which .NET runtime and version are you targeting? 4.6.1

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue. This is the state of the page when trying to load it from TeamCity image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kblokcommented, May 6, 2020

@Ibrahim-Islam it seems that TeamCity can’t get to your page.

1reaction
kblokcommented, May 6, 2020

Yes that would be my guess as well. How do I get the whole html of the page?

var html = await page.GetContentAsync()
Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Problems | TeamCity On-Premises Documentation
Assuming you have a configured build in TeamCity which is failing, do the following: run the build in TeamCity and see it misbehaving....
Read more >
Selenium: Unable to locate element when running on ...
I tried to change the find element method but I am getting the same error again. It seems that this error is random...
Read more >
Known Issues | TeamCity On-Premises Documentation
As a Windows service, the TeamCity agent and the build processes are not able to access network shares and mapped drives.
Read more >
Unable to get Plastic SCM to correctly run from TeamCity
It turns out that Teamcity was in a weird state. I now have it connecting to PlasticSCM. All I need to do is...
Read more >
Can't run a build in TeamCity
I have problems with some configuration of my TeamCity project. I'm trying to build an application in order to run its Unit Tests,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found