CJCV Posted September 12, 2024 at 08:47 AM Report Share #633510 Posted September 12, 2024 at 08:47 AM Olá . Cá estou eu outra vez. Porque é que este código funciona bem em dois botões separados , mas se o juntar num só botão só executa a primeira parte :( botão 1: string uri = "https://www.acesso.gov.pt/v2/loginForm?partID=PFAP&path=/geral/dashboard"; webView21.CoreWebView2.Navigate(uri.ToString()); botão 2: string script = "document.getElementById('tab2').click();"; webView21.CoreWebView2.ExecuteScriptAsync(script); Obrigado desde já. Link to comment Share on other sites More sharing options...
Solution migueldesousa Posted September 12, 2024 at 10:03 PM Solution Report Share #633518 Posted September 12, 2024 at 10:03 PM Boas, provavelmente ainda não carregou a primeira pagina. podes possivelmente ultrapassar esse problema com eventos, deixo te aqui um link. https://stackoverflow.com/questions/59378097/equivalence-of-webbrowser-documentcompleted-and-webbrowser-navigating-event-in-w 2 Report áááá caralhassssssss Link to comment Share on other sites More sharing options...
CJCV Posted September 16, 2024 at 09:29 AM Author Report Share #633528 Posted September 16, 2024 at 09:29 AM Ok , vou testar isso, Obrigado. Link to comment Share on other sites More sharing options...
CJCV Posted September 18, 2024 at 08:57 AM Author Report Share #633530 Posted September 18, 2024 at 08:57 AM Obrigado pela dica. com esses links e depois de muitas voltas consegui por isso a funcionar. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now