Stop while loop and continue click on next page of table

0 votes
On starting browser it clicks all href link on first page of table and proceeds for next page, but after reaching at last page it continous with clicking on href link how to terminate it. I am using pycharm. Please help....
Jul 31, 2020 in Python by Vishal
• 120 points
694 views

1 answer to this question.

0 votes

Hey, @Vishal,

 Python provides two keywords that terminate a loop iteration prematurely:

  • The Python break statement immediately terminates a loop entirely. Program execution proceeds to the first statement following the loop body.

  • The Python continue statement immediately terminates the current loop iteration. Execution jumps to the top of the loop, and the controlling expression is re-evaluated to determine whether the loop will execute again or terminate.

Could you please provide your code snippet so that I can demonstrate to you where you should use break to terminate the loop?

answered Aug 3, 2020 by Gitika
• 65,770 points

Related Questions In Python

+1 vote
1 answer
0 votes
1 answer

How to get all links and all elements that are clickable on a page of system dynamically?

Hello, You can do it by using find_elements_by_xpath() driver ...READ MORE

answered Aug 27, 2020 in Python by Niroj
• 82,840 points
5,492 views
0 votes
1 answer

Return a list inside a for loop while iterating over the elements of another list

The print() is getting called multiple times ...READ MORE

answered Sep 22, 2018 in Python by SDeb
• 13,300 points
5,054 views
0 votes
1 answer
+4 votes
3 answers

Write a for loop that prints all elements of a list and their position in the list. a = [4,7,3,2,5,9]

Try using this question by list comprehension: a=[4,7,3,2,5,9] print([x for ...READ MORE

answered Dec 9, 2019 in Python by vinaykumar
• 200 points
34,906 views
0 votes
0 answers

For some reason i cannot click on this element/button and have been trying for hours PLEASE HELP!!

from selenium import webdriver from selenium.webdriver.chrome.options import Options from ...READ MORE

Jun 18, 2020 in Python by Justin
• 140 points

reshown Jun 18, 2020 by Sirajul 793 views
0 votes
1 answer

.What is the meaning of "while True :" while doing in a loop.

The body of the loop will continue ...READ MORE

answered Oct 7, 2020 in Python by Gitika
• 65,770 points
703 views
0 votes
1 answer

Which will good platform to perform anaconda navigation or other and install the package on anaconda ide

Hey, @Daulat, We use Anaconda Navigator to launch ...READ MORE

answered Apr 8, 2020 in Python by Gitika
• 65,770 points
844 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP