Skip to content

Commit 246d6a5

Browse files
Update README.md
1 parent 242e9d8 commit 246d6a5

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ if you know that the incriment of the slider will be constant then simply pass t
1515

1616
<br>
1717

18-
MoveSliderWithInfo(int SliderMax, int SliderMin, decimal Amount, IWebElement Slider, IWebDriver driver)
18+
### MoveSliderWithInfo(int SliderMax, int SliderMin, decimal Amount, IWebElement Slider, IWebDriver driver)
1919

2020
supply the method with the maximum value of the slider (what is actually output to the user), the mininum value of the slider, the amount you want the slider moved to, the slider you want moved as an IWebElement and the driver being used as an IWebDriver.
2121

2222
Comes with overloads for Amount in any numerical format or as a string with a basic non-numerical symbol removal filter
2323

2424
<hr>
2525

26-
MoveSliderNoInfo(IWebDriver driver, IWebElement slider, dynamic amount)
26+
### MoveSliderNoInfo(IWebDriver driver, IWebElement slider, dynamic amount)
2727

2828
This is meant to be used when you do not know the maximum or mininum values of the slider on the web browser, it however relies on the slider containing the Max and Min tags within the Dom element as it uses the "Element.getAttribute" method to retrieve these values.
2929

@@ -32,7 +32,7 @@ Supply the method with the driver being used, the slider you want moved and the
3232

3333
<hr>
3434

35-
MoveSliderUsingTextBox(IWebElement Slider, IWebElement textBox, IWebDriver driver, decimal Amount)
35+
### MoveSliderUsingTextBox(IWebElement Slider, IWebElement textBox, IWebDriver driver, decimal Amount)
3636

3737
This is meant to be used when you don't know the maximum or mininum values of the slider on the web browser and the slider element does not contain the Max And/Or Min tags, it however relies on the textbox that the value of the slider is output to, to be specified as it will move the slider, read the output and then use this information to construct the values of the maximum value of the slider, mininum value of the slider to then calulcate the amount of pixels the slider has to move in order to be at the amount specified.
3838

@@ -41,27 +41,27 @@ It employs a basic filter method that removes any non numerical symbols which I
4141

4242
<hr>
4343

44-
MoveSlider(IWebElement Slider, IWebDriver driver, int Pixels)
44+
### MoveSlider(IWebElement Slider, IWebDriver driver, int Pixels)
4545

4646
This is what's called to actually move the slider, If you already know the exact pixel value from the mininum that the slider has to move then you are able to directly call this subroutine and it will move the slider to the positon you want it to be but otherwise call the most appropriate method from above to do the amount to pixel conversion and movement automatically
4747

4848
<hr>
4949

50-
GetIncrement(IWebDriver driver, IWebElement Slider, IWebElement textBox, decimal SliderMin)
50+
### GetIncrement(IWebDriver driver, IWebElement Slider, IWebElement textBox, decimal SliderMin)
5151

5252
A nifty little subroutine that will find the smallest amount that the slider can be adjusted by, useful for testing.
5353

5454

5555
<hr>
5656

57-
Filter(string TextBoxText)
57+
### Filter(string TextBoxText)
5858

5959
This is used for taking an input, removing any non-numerical characters and returning the result as a decimal. This is used primarily in the "MoveSliderUsingTextBox" subroutine where the actual output from the slider through the speicfied textbox is used to calculate the amount of pixels necessary to move the slider. For example if you had a slider which output £2,000.00, the £ and , would throw an illegal input exception, this subroutine means that the program only sees "2000.00" as it only keeps numbers 0-> 9 and a decimal point.
6060

6161

6262
<hr>
6363

64-
GetPixelsToMove(IWebElement Slider, decimal Amount, decimal SliderMax, decimal SliderMin)
64+
### GetPixelsToMove(IWebElement Slider, decimal Amount, decimal SliderMax, decimal SliderMin)
6565

6666
This is where the majority of the mathematical calculation is done, using a mathematical method I came up with myself it takes in the width of the slider, the Maximum and mininum values of the slider and the amount the user wants to set the slider to and works out the amount in pixels from mininum the slider must be used.
6767

0 commit comments

Comments
 (0)