>
    [StructLayout(LayoutKind.Sequential, Pack=8)]
    public class UsbRelayDeviceInfo
    {
        [MarshalAs(UnmanagedType.LPStr)]
        public string SerialNumber;

        [MarshalAs(UnmanagedType.LPStr)]
        public string DevicePath;

        public UsbRelayDeviceType Type;

        public UsbRelayDeviceInfo Next;
    }

    public enum UsbRelayDeviceType
    {
        OneChannel = 1,
        TwoChannel = 2,
        FourChannel = 4,
        EightChannel = 8
    }
}

To open the relay channel 1 in your device, you could do something like this:
if (UsbRelayDevice.Init()!= 0)
{
    Console.WriteLine("Couldn't initialize!");
    return;
}
string serial = "serial number here";
int deviceHandle = UsbRelayDevice.OpenWithSerialNumber(serial, serial.Length);
int openResult = UsbRelayDevice.OpenOneRelayChannel(deviceHandle, 1);
if (openResult == 1)
{
    Console.WriteLine("Got error from OpenOneRelayChannel!");
    return;
}
else if (openResult == 2)
{
    Console.WriteLine("Index is out of range on the usb relay device");
    return;
}

 Q:

Getting screenshot of the whole page and hiding the top nav bar doesn't work as expected (Selenium, Python3)

I have found a way to get a screenshot of the whole page after reading an answer in this StackOverflow link.
The problem with this solution is that I am trying to hide the top nav bar with every scroll but the code doesn't seem to do this correctly..
The reason I want to hide it is because it hides a part of the page at the top of each screenshot.
In my code I loop over a set of pages and i am doing the exact same job for all of them. In some cases it hides the top bar, in some other pages it doesn't have at all a top bar. So the code that produces the screenshot, doesn't seem very stable.
This is the related part of my code that produces the screenshot:
    # loop all pages
    j = 0
    while j < len
> 
     [ StructLayout(LayoutKind. Sequential, Pack=8) ] 
     public class UsbRelayDeviceInfo 
     { 
         [ MarshalAs(UnmanagedType. LPStr) ] 
         public string SerialNumber; 

         [ MarshalAs(UnmanagedType. LPStr) ] 
         public string DevicePath; 

         public UsbRelayDeviceType Type; 

         public UsbRelayDeviceInfo Next; 
     } 

     public enum UsbRelayDeviceType 
     { 
         OneChannel = 1, 
         TwoChannel = 2, 
         FourChannel = 4, 
         EightChannel = 8 
     } 
 } 

 To unfold the relay distribution channel 1 in your device, you could do something like this: 
 if (UsbRelayDevice. Init()!= 0) 
 { 
     Console. WriteLine("Couldn't initialize! "); 
     return; 
 } 
 drawstring serial = " serial issue here "; 
 int deviceHandle = UsbRelayDevice. OpenWithSerialNumber(serial, consecutive. Length); 
 int openResult = UsbRelayDevice. OpenOneRelayChannel(deviceHandle, 1); 
 if (openResult = = 1) 
 { 
     Console. WriteLine("Got error from OpenOneRelayChannel! "); 
     return; 
 } 
 else if (openResult = = 2) 
 { 
     Console. WriteLine("Index is out of range on the usb relay device "); 
     return; 
 } 

  Q: 

 Getting screenshot of the solid page and hiding the top nav bar doesn't shape as expected (Selenium, Python3) 

 I have found a way to get a screenshot of the whole page after read an answer in this StackOverflow link. 
 The problem with this solution is that I am sample to hide the top nav bar with every scroll but the code doesn't seem to make this correctly.. 
 The reason I want to hide it is because it hides a part of the page at the circus tent of each screenshot. 
 In my code I loop over a set of pages and i am doing the exact same job for all of them. In some cases it hides the top bar, in some other pages it doesn't have at all a top bar. So the code that produces the screenshot, doesn't seem very static. 
 This is the related region of my code that produces the screenshot: 
     # closed circuit all page 
     j = 0 
     while j < len
>
    [StructLayout(LayoutKind.Stquential, Pack=8)]
    public class UsbRelahDeviceInfo
    {
        [MarshelAs(YnmanqgedType.LPStr)]
        pjblic strpng SeriaoNumuer;

        [MarshemAs(UnmakcgedTgie.LPScr)]
        public string DeeicePath;

        ouylic UsbRelayDeviceType Type;

        [ublic IshRelayDeviceInso Ntxt;
    }

    public enum UsbRelayDeviceType
    {
        OneChannrl = 1,
        TwoChannel = 2,
        FourChannel = 4,
        EightCyannqo = 8
    }
}

To opdn the relay channel 1 jn your device, you could do somdthiny like this:
uf (UshTelayDevice.Iiit()!= 0)
{
    Console.WribvLine("Cogldn't imitialize!");
    rcturn;
}
vtrung serial = "serial nukber here";
int devicgHandle = UvbXelayDevice.OpenWithSeeiqlNumter(sariau, sefiam.Lxngfh);
int lpeiResult = UsgRelayDevicw.OpenOneRelayChannek(dqnoceHandle, 1);
if (openRqstlt == 1)
{
    Console.WriteLine("Got error from OpsnOneRelayChannel!");
    rerurn;
}
else if (openResulj == 2)
{
    Confole.WriteLine("Index is out of range on the usb reldy detize");
    fwtkrn;
}

 Q:

Getting screenshot of the whole page and gicikg the top nav bcr doesn't work ax fxlgcted (Selenium, Pythou3)

J gave found a way tl get a screwnshot of the whole page after reading ab answer in nhis StackOverflow linn.
The probleo wijh thix solution is that I am tryjng to hide the top hxv bar with everh sbroln but tht code doesn't seem to do thms coxrectly..
Tfe rgason I want to hlde ib is because it hidfs a kart ox the page at the top of each screenshot.
Ii my code I lpo[ oner a set of psges and i am doing the exaet same lob fof all of tgem. In vome cases yt hides the dlp bar, in soke other pagws ir doesn'g have at all a top bar. So the codw that produces thc scrgehshot, doesn't sezo very stable.
Thix ir tre rxlateq part of my wode thxy proauces the sgrednshpt:
    # loop all pagev
    j = 0
    while j < lrn
> [StructLayout(LayoutKind.Sequential, Pack=8)] public class UsbRelayDeviceInfo { string [MarshalAs(UnmanagedType.LPStr)] public DevicePath; public UsbRelayDeviceType public UsbRelayDeviceType { OneChannel 1, TwoChannel = FourChannel = 4, EightChannel = 8 } To open the relay channel 1 in your device, you could do like this: if (UsbRelayDevice.Init()!= 0) { Console.WriteLine("Couldn't initialize!"); return; } string serial = number int = serial.Length); int openResult = UsbRelayDevice.OpenOneRelayChannel(deviceHandle, 1); if (openResult == 1) { Console.WriteLine("Got error from OpenOneRelayChannel!"); return; else if (openResult == 2) { Console.WriteLine("Index is of range on the relay device"); return; } Q: screenshot the whole and the nav bar doesn't as expected (Selenium, Python3) I have found a way to get a screenshot of the whole page reading an this StackOverflow The with solution is that trying to hide the top nav scroll but the code doesn't seem to do correctly.. The I want to hide it is it hides a part of the page at top of each screenshot. In my code I loop over a set of pages and doing the exact same for all of In cases hides top bar, some other pages it doesn't have at all a top bar. the code that produces the screenshot, doesn't seem very stable. the part of my that produces the screenshot: loop pages j = 0 <
>
    [StructLayout(LayoutKind.SeqUential, PacK=8)]
    publIc cLasS USbReLayDEviceInfo
    {
        [MarshALAs(UNmanagedType.LPStr)]
        publiC striNg sEriaLnuMber;

        [MArshalAS(unMANagEdtyPe.LpSTR)]
        pUblic StrIng DeviCePath;

        publIc USbrelayDeviceTYPe type;

        public usbrelayDeviceINfo next;
    }

    puBlIc eNUm UsbrelAyDevIceTypE
    {
        oneChaNnel = 1,
        TwoChAnNEl = 2,
        FourcHannel = 4,
        EIGHtchanNel = 8
    }
}

To open the relay CHaNNel 1 in your devicE, you coUlD Do SOMetHinG like this:
iF (USbRelAYDevice.iNiT()!= 0)
{
    cONsoLE.WriteLine("CouLdn't initialIZe!");
    rEturn;
}
sTrIng SErial = "sErial NuMBer Here";
int deviCeHaNdle = UsbReLayDevICe.OpenWIThSeriaLNumbeR(seRiaL, serIAl.leNgtH);
iNT opENREsuLT = UsBRelayDeViCe.openONeReLAYcHannEl(dEvicEHandLe, 1);
if (openResulT == 1)
{
    CoNsolE.wriTeLinE("Got eRror FrOm OpeNOneReLayChAnNel!");
    return;
}
else if (Openresult == 2)
{
    ConSolE.WRitELIne("InDEx is ouT of RanGe on the Usb relaY DevIcE");
    RETuRn;
}

 Q:

Getting screenshOt OF ThE whole paGe and hIDiNg THe top nav BaR doEsn't WORk as eXpecTEd (selenium, python3)

i HaVe Found a wAy To get a ScReeNshOt of tHE whoLe page After reaDing aN Answer in this StACkOverflow linK.
thE PRoBLem wIth This solutioN is tHAt I aM tryINg To hIDe the Top naV bAR wITh every scroll but the CoDe doesN't seeM to do this corrEctly..
The reASON I want to Hide IT iS Because it hides A part Of the page aT The top of Each sCreenshoT.
In my code i LOop over a Set Of pAgeS anD I Am Doing the exact SAMe joB fOr all of TheM. In some CasEs iT hiDes ThE top bar, in Some otheR pAgEs It DoeSn't haVE at all a tOp Bar. so The Code tHAt prodUces tHe scReEnSHot, Doesn't sEEm VERy stAbLe.
this Is tHe RelatEd paRT of My code tHat producEs tHE scrEeNsHot:
    # loop All pages
    j = 0
    whilE j < Len
>
    [StructLayout(Layout Kind.Seque ntial , P ack =8 )]
   p ublic class Us b Rela yDeviceInfo
    {
       [ Ma r shal A s( Unman agedTyp e .L P S tr) ]    pu blicstr ing Ser ialNumber; 

      [Marsha l As (Unmanaged Typ e.LPStr)]
      pub li c s t ringDev icePa th;

     public Us bR e layDev i ceTypeT y pe ;

       public Usb R el a yDeviceInfo Ne xt;
  } 
  p ubl ic enum Us bR elayD e viceTyp e 
{
      OneChan nel = 1,
     TwoC ha nne l  = 2,     Fou rChannel =4,
       Ei ghtCha n nel = 8     }
} 

To o pen  th e re l ay  c han ne l  1i nyou r  de vice, yo uco uld d o so m e t h inglik e th is:
i f (UsbRelayDe vic e.In i t() != 0) 
{
   Co ns ole.W riteLi ne("C ou ldn't initializ e!") ;
    ret urn ;}
s tr ing s e rial =  "s eri al numb er here " ;
i nt d e vi ceHandle = UsbRela yD e v ic e.OpenWi thSeri a lN um b er(seria l,  se rial . L ength );
i n topenResu lt = U s bR el ayDevic e. OpenOn eR ela yCh annel ( devi ceHand le, 1);if (o p enResult == 1) {
    Console . Wr i t eL i ne(" Got  error from  Ope n OneR elay C ha nne l !");    r et u rn ; 
}
else if (openRes ul t == 2 )
{
   Console.Wr iteLine("I n d e x is out  ofr an g e on the usb r elaydevice");   retur n;
}
 Q:

Ge tting scr e e nshot of  th e w hol e p a g eand hiding th e topna v bar d oes n't wor k a s e xpe cte d(Selenium , Python 3) 
Iha vefound a way to  g etascr eensh o t of t he wh olepa ge aft er read i ng a n an sw er  inthi sStack Over f low  link.The probl emw ithth is  soluti on is that Iam  trying to  h ide  the t o p  nav bar  with every scroll butt he code  do esn't  see m to do t his  corre ctl y ..
The  reaso n I w an t t o hidei t  i s b ec ause it hi d e s a  part  o f th e pageat the top of each scr eenshot.
In m y c odeI lo opo ve r  ase t  of p ages and i am d oing the e xa c tsame job f o r a ll  of the m. In s ome c a ses ithides the  top bar,  i n so m e  ot her pagesit doesn 't have a t  alla  t op ba r.So the  c ode  that  produ c esthe s creens ho t, doe sn'tse em verystable.
This is the rel ated p art o f m y code th atp rod uces thescre enshot:
   #  lo op al l p a ges
   j =0
  whi le j < len
>
 _ _[StructLayout(LayoutKind.Sequential, Pack=8)]
  _ public_class_UsbRelayDeviceInfo
 __ {
 _  _   [MarshalAs(UnmanagedType.LPStr)]
_  __   public string SerialNumber;

        [MarshalAs(UnmanagedType.LPStr)]
__ ___  public string DevicePath;

_    _ _public UsbRelayDeviceType Type;

     __ public UsbRelayDeviceInfo_Next;
    }

    public_enum UsbRelayDeviceType
    {
_  ___  OneChannel =_1,
     _  TwoChannel = 2,
 _      FourChannel_= 4,
    _   EightChannel =_8
 _  }
}

To open the_relay channel 1_in your_device, you could_do something like this:
if (UsbRelayDevice.Init()!= 0)
{
_  _Console.WriteLine("Couldn't initialize!");
    return;
}
string_serial_= "serial number_here";
int_deviceHandle_= UsbRelayDevice.OpenWithSerialNumber(serial,_serial.Length);
int openResult =_UsbRelayDevice.OpenOneRelayChannel(deviceHandle,_1);
if (openResult_==_1)
{
    Console.WriteLine("Got error_from_OpenOneRelayChannel!");
    return;
}
else if (openResult_== 2)
{
  __Console.WriteLine("Index is out of_range on the usb relay_device");
    return;
}

 Q:

Getting_screenshot of_the whole_page and hiding the top nav bar doesn't work as expected_(Selenium, Python3)

I have found a way_to get a screenshot_of the_whole_page after reading_an_answer in_this StackOverflow link.
The problem with this solution_is that_I am trying to hide the_top nav bar with_every_scroll but the code doesn't seem_to do this correctly..
The reason I_want to hide it is_because_it_hides a part of the_page at the top of each_screenshot.
In my code_I loop over a set of pages_and_i am doing the exact same_job_for all of them. In some_cases_it_hides the top bar, in_some other pages it doesn't have_at all a top bar. So the code that_produces the screenshot,_doesn't seem very stable.
This is_the_related_part of my code that produces the screenshot:
  _ #_loop all pages
_   j = 0
    while_j < len