How to add checkbox to first/welcome page in Inno Setup - checkbox

How do I add the check box to a particular page in Inno Setup?
I want the check box to be shown only in the first page or ReadyToInstall page?
I wrote code to add check box to WizardForm, but I see the check box is in every other page. I see we have to specify which page but i tried several options and it's just not happening.
I believe this should be simple but I'm totally lost.
Also, from the screenshot below, my checkbox label seems to have some highlighted background. how can i get rid of this background and add border to check box in light color?
var
EnableRMCheckBox: TNewCheckBox;
procedure InitializeWizard;
begin
EnableRMCheckBox := TNewCheckBox.Create(WizardForm);
EnableRMCheckBox.Parent := WizardForm;
EnableRMCheckBox.Top := 120;
EnableRMCheckBox.Left := 87;
EnableRMCheckBox.Width := 180;
EnableRMCheckBox.Caption := 'Enable RM';
end;

Moving TLama's answer from comment to here.
The problem is the Parent that you chose. Use WizardForm.WelcomePage instead. Then the back color of the check box label will adapt to the page rather than the wizard form (WizardForm you used as Parent).

Related

Scroll down on the terms and condition Textbox and click on Agree selenium

I am working on Protractor tests. Recently my web page changed where the terms and conditions are inside a textbox. Button Submit works only when the user scrolls through the textbox and clicks on Agree button. I tried the following option to scroll down but it is not scrolling down. Any help is greatly appreciated.
var scrollbar = element(by.id('terms-conditions'));
var checkbox = element(by.id('checkbox'));
scrollbar.click()
browser.executeScript('arguments[0].scrollIntoView()', scrollbar.getWebElement());
browser.executeScript('window.scrollTo(0,670);')
checkbox.click();
I followed the below link too but no luck.
Protractor: Scroll down
The second js execute statement you are using contains Window.scrollTo which references an open window in a browser. and using it only scrolls the complete window but not the pop-ups that appear inside a browser window
Refer here for documentation on Window.scrollTo
Normally terms and conditions shows up in a pop-up or may be a div and hence Window.scrollTo doesn't work
there are two ways you can do it
SOLUTION 1: use Jquery scrollTop() to scroll inside a specific webElement
Step 1: Identify the exact div that holds your terms of Service scroll bar
Step 2: Refine your js statement by trying directly in Chrome console
$('.modal-body').scrollTop() -> This returns the current position of scroll
$('.modal-body').scrollTop(10000) -> This sets the value of top position
Step 3: Incorporate this in your protractor script
browser.executeScript('$('.modal-body').scrollTop(10000)');
You can professionalize this by passing the element & scroll amount as arguments. Refer here
SOLUTION 2; The best way I see to submit a pop-up is not to deal with interface but to deal with the 'form' element behind it. Similar to how we deal with file uploads.No fuss & effective
May be try something like this, by making button visible first and then submit form
browser.executeScript is an asynchronous call, so you will need to put it into the controlFlow so that it will complete before clicking the checkbox:
scrollbar.click();
browser.controlFlow().execute(function() {
browser.executeScript('arguments[0].scrollIntoView()', scrollbar.getWebElement());
browser.executeScript('window.scrollTo(0,670);');
});
checkbox.click();

Hide checker (if true) in a interactive PDF with custom checkbox created with inDesign

I got a problem with checkbox field using Adobe Indesign.
I want an image to become my checkbox button and also change the image after clicking. Unfortunately, after clicking on this button the image changes properly, but it also adds checker (check sign) in the middle of the picture. Can't see to overcome this.
It looks like this:
checkmarks
I would consider using two buttons for that. One hiding the opposite and vice-versa. Here is an example:
And here is a link to the package :
http://www.filedropper.com/dossieronoff
And here is a link to a demo PDF:
http://www.filedropper.com/onoff

Not able to click on the drop down element

In our application when i mouse over a menu item, drop down appears. Where i want to select an item by clicking on it.
Main Menu:Admin
Sub menu: Manage Channels, Manage Users
In selenium webdriver, i tried to click directly on Manage Channels by giving the xpath, linktext,partial link text.
But all says unable to locate element. i'm attaching image of the screen shot for reference
Please check it
driver.findElement(By.linkText("Manage Channels")).click();
driver.findElement(By.xpath("//li/a[contains(., \"Manage Channels\")]")).click();
driver.findElement(By.partialLinkText("Manage Channels"));
http://farm8.staticflickr.com/7454/9490144055_1f7da5eaf1_m.jpg
I used the below code which finally solved my question.
WebElement ManageChannels = driver.findElement(By.linkText("Admin"));
Actions builder = new Actions(driver);
Action mouseOverAdmin = builder.moveToElement(ManageChannels).build();
mouseOverAdmin.perform();
driver.findElement(By.linkText("Manage Channels")).click()
i managed to click on item in the drop down. thank you very much for the effort

GridControl Navigation

In VFP9 I have a grid control ,witch show the records from a database table. And also I have a command button wherewith I want to navigate from a row to another. I tried with thisform.grid1.ActiveRow = thisform.grid1.ActiveRow +1 ,but this doesn't work. Thanks in advance.
Per the VFP documentation, the ActiveRow Property "Specifies the row that contains the active cell in a Grid control. Not available at design time; read-only at run time".
I would do something like this.
IF EOF("TableAlias) = .F.
SKIP 1 IN "TableAlias"
ENDIF

Celerity - Help with popup_browser select list that updates div text on main browser

I'm screen scraping a page that includes a link that spawns a popup window that is comprised of a select list and a button to execute your selection. The objective is to click the link on the main page, make a selection on the pop-up window, click the link to confirm the selection and then view the new selection on the main webpage.
Here are the steps that I'm taking in Celerity and the results:
popup_browser = browser.image(:alt, 'Holidays').click_and_attach
#this creates a new browser to deal with the popup window
popup_browser.select_list(:id, 'ddlSlot1').select_value('Christmas')
#Selecting Christmas from the select list
popup_browser.link(:id, 'btnChangeHoliday').click
#Confirms/Implements selection
popup_browser.close
#Closes popup browser
puts browser.div(:id, 'HolidayName').text
#Here I try to print the updated holiday but nothing is printed (no text value)
Everything seems to work fine except for the last line. I've done some debugging and have confirmed that my selection has been made. It seems that the main webpage is not being updated after I click the ChangeHoliday button on the popup page.
Any thoughts or suggestions would be appreciated.
Thanks in advance for you help.
This turned out to be an easy fix. The only change required for the script to work is to add the resynchronize option to the browser initialization. After doing so the script works as expected.
browser = Celerity::IE.new(:resynchronize => true)

Resources