1

first of all I want to tell that I'm coding quite long but it is just a hobby and I never went to school for this so be patience with me I may sound not like you used to.

My problem is this:

I have Form1 and 2 Classes. From Form1 I have 4 RadioButtons and each is called from Class1 or Class2 depends on which task I call from Form1 under StartButton.

I setup 4 different options to go to URL and start scraping data using PuppeteerSharp. When I last time implement this options it is however stuck on the URL choice and it is just going in blank browser page and wait.. It can not choose if radiobutton is checked True or False so it can not continue to the desired URL.

It may sound stupid but I know it is weird error but I have no error it is just stuck on blank page.

Here is the code in Class1 which should be able to work and check which RadioButton is checked:

  If Form1.RadioButton1.Checked Then
          Await page.GoToAsync(URL1)
  ElseIf Form1.RadioButton1.Checked Then
          Await page.GoToAsync(URL2)
  ElseIf Form1.RadioButton1.Checked Then
          Await page.GoToAsync(URL3)
  Else
          Await page.GoToAsync(URL4)
 End if 
DuBarTech
  • 11
  • 2
  • For a start, you are only checking If Form1.RadioButton1.Checked so this will only ever go to URL1 if it is checked, or URL4 if it is not. Also, do you need the Await? Is there functionality in the rest of the method that needs that? To get some possible action even if it's wrong, can you run without Await? – Catherine Apr 20 '22 at 07:54
  • @Catherine thank you for answer I managed my code and there was an error so I had to add radiobuttons in my task params then declare it in class and then it worked without Form1 :) – DuBarTech Apr 21 '22 at 11:51

0 Answers0