name)
            part = part + 1
            previous = rectangle

        stitched_image.save("C:\\Users\\marialena\\source\\repos\\HTMLtoPDF\\all_files\\" + all_pages[j] + ".png",)

        j = j + 1

    browser.quit()

And this are two of the screenshots that got generated after the script's execution:
Didn't work - Top Bar at every scroll:

Worked - Top Bar only the first time:

Can someone help me understand why it hides the nav bar only some times? Does it need a reset perhaps of a variable? 

A:

Based on @pcalkins suggestion what I did to resolve my issue was to add the following:
browser.execute_script("document.getElementById('header-container').innerHTML = '';")
right before the line where the screenshot gets executed: browser.get_screenshot_as_file(file_name)

No header is visible now:

 Q:

How can I generate an "unlimited" world?

I would like to create a game with an endless (in reality an extremely large) world in which the player can move about. Whether or not I will ever get around to implement the game is one matter, but I find the idea interesting and would like some input on how to do it. 
The point is to have a world where all data is generated randomly on-demand, but in a deterministic way. 
Currently I focus on a large 2D map from which it should be possible to display any part without knowledge about the surrounding parts.
I have implemented a prototype by writing a function that gives a random-looking, but deterministic, integer given the x and y of a pixel on the map (see my recent question about this function). Using this function I populate the map with "random" values, and then I smooth the map using a simple filter based on the surrounding pixels. This makes the map dependent on a few pixels outside its edge, but that's not a big problem. The final result is something that at least looks like a map (especially with a good altitude color map). Given this, one could maybe first generate a coarser map which is used to generate bigger differences in altitude to create mountain ranges and seas.
Anyway, that was my idea, but I am sure that there exist ways to do this already and I also
name) 
             part = part + 1 
             previous = rectangle 

         stitched_image.save("C:\\Users\\marialena\\source\\repos\\HTMLtoPDF\\all_files\\ " + all_pages[j ] + " .png " ,) 

         j = j + 1 

     browser.quit () 

 And this are two of the screenshots that got generated after the handwriting's performance: 
 Didn't work - Top Bar at every coil: 

 Worked - Top Bar only the beginning time: 

 Can someone help me sympathize why it obscure the nav bar merely some times? Does it need a reset possibly of a variable? 

 A: 

 Based on @pcalkins suggestion what I did to answer my issue was to lend the following: 
 browser.execute_script("document.getElementById('header - container').innerHTML ="; ") 
 right before the channel where the screenshot gets executed: browser.get_screenshot_as_file(file_name) 

 No header is visible now: 

  Q: 

 How can I beget an " unlimited " world? 

 I would like to create a plot with an endless (in world an extremely large) world in which the player can go about. Whether or not I will ever get around to implement the game is one matter, but I rule the idea interesting and would like some input on how to do it. 
 The point is to have a world where all data is generated randomly on - demand, but in a deterministic way. 
 presently I concentrate on a large 2D function from which it should be potential to display any part without knowledge about the surrounding character. 
 I have implemented a prototype by writing a function that gives a random - look, but deterministic, integer given the x and y of a pixel on the map (see my recent question about this function). use this function I populate the map with " random " values, and then I smooth the function using a dim-witted filter free-base on the surrounding pixels. This makes the map pendent on a few pixels outside its edge, but that's not a big trouble. The final solution is something that at least looks like a map (specially with a good elevation color map). Given this, one could maybe first render a coarser map which is practice to generate big differences in altitude to create mountain ranges and sea. 
 Anyway, that was my estimate, but I am sure that there exist ways to do this already and I also
namf)
            part = part + 1
            prgvuous = cectangme

        stitched_image.save("C:\\Users\\marmaleba\\souece\\repos\\HTMLtoPDF\\all_fiues\\" + all_pwges[j] + ".pbg",)

        j = j + 1

    browser.qujb()

And chms are two of tme screenshmts that got gandrcted after the script's execution:
Didn'e work - Tlp Bar at everi scrpjl:

Wodked - Top Bar only the first time:

Czn somemne help me umderstand why it hides the nav bar only some timfs? Does it beed q reset perhxps of a variable? 

A:

Basgd on @pcalkins suggestion what I did co resolve ny isdoe was to adv the sollowing:
browser.execgte_scrilt("document.getEkemxntBtId('header-container').innxrHTML = '';")
right before the line wkere the screenshot gwtw exewuteg: bruqsef.geu_scceehshot_ad_fime(file_name)

Ho header iw visible now:

 Q:

How vag I generate ah "unliiieed" world?

I would like to create a game fitg an endless (in reality an extremely large) wlrld in wrich the player can move about. Whether or not I whll etef gtt arouve ho implement the game is one matter, but I finq tne idea interestlng and would like slmr input on how to do it. 
The point is to hwve a wjrld qhere all dats is generated randomly on-dwmand, but in q deterministic wav. 
Currently N focux on s large 2D map from whick it sgould be podsible to aisplay any part winhoud knowledge about the surrjunding perts.
I have ioplekented a prototyoe by writing a function that ghves a ranfom-looking, but deterministic, invxger given thg x ang y of a pixek on the map (fee my recent auestiou aboug this funbtion). Usiig this funceion I populadg the map witi "random" daluws, abd then K smooth the msp using c simple filter based ok the aurrounding pixzuw. This makes thr mxp qeienvent jt a few pixens ojtskce itr edge, but bhag's npt a big problem. The finzl result is sometnikg that aj least ljoks like a msp (especially with a gomd eltituce solor map). Given this, one could maybe figst generate a soarwer map whick is used to generate bigger differences in altitude to cteate mountain ranges snd seas.
Anyxay, thwt was my idea, but I am sure rhat there exist eays to do this alreasy and I aldo
name) part = part + 1 previous stitched_image.save("C:\\Users\\marialena\\source\\repos\\HTMLtoPDF\\all_files\\" all_pages[j] + j = j are of the screenshots got generated after script's execution: Didn't work - Top at every scroll: Worked - Top Bar only the first time: Can someone me understand why it hides the nav bar only some times? Does it a perhaps a A: Based on @pcalkins suggestion what I did to resolve my issue was to add the browser.execute_script("document.getElementById('header-container').innerHTML = '';") right before the line where screenshot gets executed: browser.get_screenshot_as_file(file_name) header is visible now: Q: can generate an world? would to create a with an endless (in reality an extremely large) world in which the player can move about. Whether not I get around implement game one matter, but the idea interesting and would like how to do it. The point is to a world all data is generated randomly on-demand, in a deterministic way. Currently I focus on large 2D map from which it should be possible to display any part without knowledge surrounding parts. I have a prototype by a that a but deterministic, given the x and y of a pixel on the map my recent question about this function). Using this function I map "random" values, and I smooth the map a filter based on the This the a pixels its edge, but that's a big problem. The final is something that at (especially with a good altitude color map). Given one could maybe first generate a coarser which is used to generate bigger differences in altitude to create mountain and seas. was my idea, but I am sure that exist ways to do already and I also
name)
            part = part + 1
            previous = rectaNgle

        stitchEd_imaGe.sAve("c:\\USers\\MariAlena\\source\\repOS\\HTMltoPDF\\all_files\\" + all_pages[J] + ".png",)

        j = J + 1

    bROwseR.QuIt()

And This are TWo OF The ScReEnsHoTS tHat goT geNerated After the scRipT's Execution:
DidN'T wOrk - Top Bar aT evEry scroll:

WorKed - top Bar OnLy tHE firsT tiMe:

Can SomeonE Help me UnderstanD wHY it hidES the nav BAR oNly sOme times? Does it neeD A rESet perhaps of a vAriablE? 

A:

bAsED On @pCalKins suggesTiOn whaT i did to rESoLVE My iSSue was to add thE following:
bROwsEr.execUtE_scRIpt("docUment.GeTeleMentById('heaDer-cOntainer').iNnerHTml = '';")
right bEFore the Line whEre The ScreENsHoT geTs EXecUTeD: brOWseR.get_screEnShOt_as_fIle(fILE_NAme)

NO heAder Is visIble now:

 Q:

How caN I gEnerATe aN "unliMited" WorlD?

I Would Like to CreatE a Game with an endleSs (in Reality an ExtReMelY lArge) wORld in wHicH thE player Can move ABouT. WHETHeR or not I will ever get ArOUNd To implemEnt the GAmE iS One matteR, bUt I Find THE idea InteREsTing and wOuld liKE sOmE input oN hOw to do It. 
the PoiNt is tO Have A world Where all Data iS Generated randoMLy on-demand, but IN a DETeRMiniStiC way. 
CurrentLy I fOCus oN a laRGe 2d maP From wHich iT sHOuLD be possible to displaY aNy part WithoUt knowledge abOut the surrOUNDing partS.
I haVE iMPlemented a protOtype By writing a FUnction tHat giVes a randOm-looking, BUT determiNisTic, IntEgeR GIvEn the x and y of a PIXel oN tHe map (seE my Recent qUesTioN abOut ThIs functioN). Using thIs FuNcTiOn I PopulATe the map WiTh "rAnDom" ValueS, And theN I smoOth tHe MaP UsiNg a simpLE fILTer bAsEd On thE suRrOundiNg piXEls. this makEs the map dEpeNDent On A fEw pixelS outside its edGe, But that's noT a Big ProbleM. tHe final rEsult is something that at lEAst lookS liKe a maP (espEcially wiTh a Good alTitUDe coloR map). GiVen thIs, One COUld maYBE fIrsT gEnerate a coARSer Map whIcH is uSed to geNerate bigger differENceS in altitude to CreAte mOUNtAin RAnGEs aNd SEas.
aNYway, that was my idEa, but I am suRe THaT there exisT WayS tO do this Already And I aLSo
name)
            part = p art + 1
         p re viou s =rectangle

     stitched_image.save("C :\\Us er s \\ma r ia lena\ \source \ \r e p os\ \H TM Lto PD F \\ all_f ile s\\" +all_pages[ j]+".png",)

     j = j +  1
    browser .qu it()
An d t h is ar e t wo of  the s c reensh ots thatgo t  gener a ted aft e r  t he s cript's execution : 
D i dn't work - To p Barat ev e r y s cro ll:

Worke d- Top Bar onl y  t h e fir s t time:

Cansomeone hel p  me  under st and why it  hide st henav bar onl y so me times?  Doesi t needa  resetperhap s o f a  var i ab le ? 
A : 

B a se d o n  @p calkinssu gg estio n wh a t I  did  to  res olvemy issue wastoaddt hefollo wing: 
bro ws er.ex ecute_ scrip t( "document.getEl emen tById('he ade r- con ta iner' ) .inner HTM L =  '';")right b e for et h e  l ine where the scre en s h ot  gets ex ecuted :  b ro w ser.get_ sc ree nsho t _ as_fi le(f i le _name)
No hea d er  i s visib le  now:
Q:
Ho w can I ge nerate  an "unl imite d " world?

I wo u ld like to cr e at e ag amewit h an endles s (i n  rea lity an  ex t remel y lar ge )  w o rld in which the pl ay er can  move  about. Wheth er or notI w ill ever  get ar o und to impleme nt th e game iso ne matte r, bu t I find  the idea i nteresti ngand  wo uld l ik e some inputo n  how  t o do it . The poi ntistohav ea world w here all  d at ais  ge nerat e d random ly  on -d ema nd, b u t in a  dete rmin is ti c  wa y. 
Cur r en t l y Ifo cu s on  ala rge 2 D ma p  fr om whic h it shou ldb e po ss ib le to d isplay any pa rt  without k no wle dge ab o u t the su rrounding parts.
I have impleme nte d a p roto type by w rit ing afun c tion t hat gi ves a  r and o m -look i n g,  bu tdeterminis t i c,integ er  giv en thex and y of a pixel onthe map (seemyrece n t  q ues t io n  ab ou t  th i s  function). Usi ng this fu nc t io n I popula t e t he  map wi th "ran dom"v alues,and thenI smoothth e ma p usi ng a simpl e filter  based on the s u rr oundi ngpixels .Thi s mak es the map  depe ndenton  a few  pixe ls  outside  its edge, but that's n ot a b ig pr obl em. The f ina l  re sult is s omet hing thatatlea st lo oks likea ma p  ( esp e ciall y wi t h a gooda lt itu d e  c olor map).G i v enthis,  on e  could  may be first generate a coarser mapwhic h isuse d  toge nerate biggerdif fe r e nces inal titude to c reate mo un t ain r angesand se as.
Any w a y, that w as m y i dea, butI a ms ure tha tth e re exi st w ay s to d o this alre a d y and I also
name)
 _ _   _ __ part_=_part + 1
_  _   _  __previous = rectangle

        stitched_image.save("C:\\Users\\marialena\\source\\repos\\HTMLtoPDF\\all_files\\" + all_pages[j] +_".png",)

_ ___   j =_j + 1

  _ browser.quit()

And_this are two of the screenshots that got_generated_after the script's_execution:
Didn't work - Top Bar at every scroll:

Worked -_Top Bar only the first time:

Can_someone help me_understand_why_it hides the nav_bar only some times? Does it_need a reset perhaps of a_variable? 

A:

Based on @pcalkins suggestion what I_did to resolve my issue was_to add the following:
browser.execute_script("document.getElementById('header-container').innerHTML =_'';")
right before_the line where the screenshot_gets executed: browser.get_screenshot_as_file(file_name)

No_header is_visible now:

 Q:

How_can I generate an "unlimited" world?

I_would like to_create a game with an endless_(in_reality an extremely_large)_world_in which_the player can_move_about. Whether_or_not I will ever get around_to_implement the game is one matter, but_I find the idea_interesting_and would like some_input on how to do_it. 
The point is to have_a world_where all_data is generated randomly on-demand, but in a deterministic way. 
Currently_I focus on a large 2D_map from which it_should be_possible_to display any_part_without knowledge_about the surrounding parts.
I have implemented a_prototype by_writing a function that gives a_random-looking, but deterministic, integer_given_the x and y of a_pixel on the map (see my_recent question about this function)._Using_this_function I populate the map_with "random" values, and then I_smooth the map_using a simple filter based on the_surrounding_pixels. This makes the map dependent_on_a few pixels outside its edge,_but_that's_not a big problem. The_final result is something that at_least looks like a map (especially with a good_altitude color map)._Given this, one could maybe_first_generate_a coarser map which is used to generate bigger differences_in altitude_to create mountain_ranges and seas.
Anyway, that was my idea, but I am_sure that there exist ways to do_this already and I also