logo
down
shadow

horizontal scrolling on the web page test


horizontal scrolling on the web page test

By : Maverick
Date : October 16 2020, 06:10 PM
may help you . TestCafe does not provide the separate scroll action, however, TestCafe performs a scroll automatically when you call any action. For example, if you need to scroll to some element, you can use the hover action.
  If you still need to scroll your page without any action, you can use the ClientFunction mechanism. Please see the following code:
code :
import { ClientFunction } from 'testcafe';

const browserscroll = ClientFunction(function() {
    window.scrollBy(0,1000)
});

test('Test', async t => {
    await browserscroll();
});
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <style>
        #scroll-container {
            overflow: scroll;
            width: 800px;
            height: 800px;
        }

        #scroll-content {
            height: 5000px;
            width: 5000px;
            background-color: blue;
        }
    </style>
</head>
<body>
    <div id="scroll-container">
        <div id="scroll-content"></div>
    </div>
</body>
</html>
import { Selector, ClientFunction } from 'testcafe';

fixture `My first fixture`
    .page `../pages/index.html`;

const scrollContainer = Selector('#scroll-container');
const scrollFn = ClientFunction(scrollValue => {
    scrollContainer().scrollLeft = scrollValue;
}, { dependencies: { scrollContainer } });

test('My first test', async t => {
    await scrollFn(1000);

    await t.debug();
});


Share : facebook icon twitter icon
Eliminate horizontal scrolling in div in favor of horizontal scrolling in browser window

Eliminate horizontal scrolling in div in favor of horizontal scrolling in browser window


By : Troll Droid
Date : March 29 2020, 07:55 AM
it fixes the issue Figured it out, I removed both overflow attributes and included an empty div after my floated content with a clear:both property. This caused the browser window to scroll rather than my div and my div to expand around my floated content.
Solution found here: http://ask.metafilter.com/134982/How-can-I-make-a-div-expand-vertically-to-fit-its-floated-content
iOS (iPhone only): Horizontal page scroll, where the scrolling page doesn't take up the whole screen

iOS (iPhone only): Horizontal page scroll, where the scrolling page doesn't take up the whole screen


By : Alina Tsikhanava
Date : March 29 2020, 07:55 AM
To fix this issue Use a UICollectionView and set the pagingEnabled property to YES.
If you want to do complex layouts of the items (like in your example above where items are split on both sides of the screen) you may want to provide your on UICollectionViewLayout: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionViewLayout_class/Reference/Reference.html#//apple_ref/occ/cl/UICollectionViewLayout
Page with multiple columns, horizontal scrolling, no vertical scrolling

Page with multiple columns, horizontal scrolling, no vertical scrolling


By : Prabin MaiNali
Date : March 29 2020, 07:55 AM
To fix this issue You can make use of flexbox layout. The columns will wrap after it reaches the maximum height using flex-flow: column wrap. Make sure you look into the browser support for flexbox.
JSfiddle Demo
code :
.outer {
  height: 500px;
  overflow: auto;
  background: #fc8;
  /* Added CSS */
  display: flex; 
  flex-flow: column wrap;
}
h1 {
  font-size: 18px;
  margin: 1px 0px 3px 0px;
  color: #248;
}
p {
  font-size: 13px;
  margin: 2px 0px;
}
.box {
  background: #def;
  padding: 3px 6px;
  border: 2px solid #369;
  margin: 3px 6px;
  vertical-align: top;
  width: 250px;
}
<div class='outer'>
  <div class='box'>
    <h1>The title 1</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 2</h1>
    <p>
      Some different text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 3</h1>
    <p>
      Some longer text here. Danish croissant. Powder halvah. Tootsie roll topping tiramisu jelly-o fruitcake cheesecake marzipan.
    </p>
  </div>
  <div class='box'>
    <h1>The title 4</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 5</h1>
    <p>
      Some text here. Chocolate cake gummi bears wafer apple pie. Bear claw gummies pie sugar plum jujubes. Liquorice croissant sugar plum danish macaroon.
    </p>
  </div>
  <div class='box'>
    <h1>The title 6</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 7</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 8</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 9</h1>
    <p>
      Some varied text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 10</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 11</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>
  <div class='box'>
    <h1>The title 12</h1>
    <p>
      Some text here...
    </p>
  </div>


</div>
Page scrolling, keep the page vertical while parts of the page are horizontal

Page scrolling, keep the page vertical while parts of the page are horizontal


By : akhilesh singh
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , The overflow CSS property gives you the possibility to embed a scroll bar directly inside a div. You could create your page by making the content of your second section wider and using this property.
HTML :
How to allow horizontal scrolling in a web page

How to allow horizontal scrolling in a web page


By : Shivam Sethi
Date : March 29 2020, 07:55 AM
Hope this helps I'm planning to display a table with a large width, so I havent' founded a CSS o HTML code to display this table and can move in a horizontally way , Set overflow to scroll
Related Posts Related Posts :
  • How does the Testcafe Roles work behind the scenes
  • Testing vim scripts
  • Integration testing with event sourcing systems
  • Is it possible to uninitialize/reinitialize/delete role in testcafe E2E test?
  • TestCafe: Chaining selectors/functions doesn't seem to work
  • How do you test user flows that involve confirmation by email?
  • How to get the testCafe exit code
  • How to execute command lines TestCafe in a project with Cucumber JS?
  • Debug Configuration in WebStorm for CucumberJS and TestCafe based project
  • ColdFusion 11 to 2018 Upgrade -- Server Locking Up, How to Test Better?
  • Accumulate all JS warnings and errors during test runs in TestCafe
  • Can't mock final class in test using Mockito with Kotlin
  • Is it possible to prevent testcafe/hammerhead scripts injection in specific iframe?
  • Test controller from Fixture passing to TESTS
  • RequestMock returns 222 status code with no body
  • How to accomplish the testcafe test structure like mocha
  • error: no browser selected to run against, but i mentioned it in .testcafe.json
  • TestCafe: how to set a button component on a page to a pressed state where its a click but not released?
  • Testcafe Page reload
  • master runner in testcafe for several other runners?
  • How do you compare selector attributes in Testcafe?
  • How to scroll up and scroll down using TestCafe?
  • Authentication with AzureAD via TestCafe Tests
  • Kotlintest - Unresolved reference shouldMatchJson
  • How to define a Role without login page in TestCafe?
  • Feedback of test runs in Testcafe
  • How to check downloaded file name?
  • Is there a way in testcafe to get the load time of specific page elements?
  • Writing a Testcafe test to assert a loading spinner is visible after making a fetch request
  • How do I locate an input field that uses a dynamic selector in TestCafe
  • How do I debug SAP ATC (ABAP Test cockpit) test runs?
  • Can we have more than one key value for method in RequestLogger for testcafe
  • How run test cafe studo tests from command line
  • In TestCafe Is possibile to register xhr and use as mocking (automocking)
  • TestCafe: Implement Page Object Model
  • Can you write unit tests if you don't actually write the code?
  • TestCafe: problem with specifying selector: span to grab text
  • What could be the reasons for taking more time while doing automation testing than manual testing for a particular web p
  • How to get only Text within the div, rather concerning about any internal tags in TestCafe
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk