I am fairly new to using protractor or using automation testing tools. I am trying to click a link on a website. The link or even a button on that page does not have an id tag. So I have tried several ways to click the button or any link on that page:
browser.driver.findElement(By.xpath('//[#id="navbar"]/ul[1]/li[1]/a')).click()
browser.driver.findElement(by.css('.btn.btn-primary.btn-xlarge')).click()
browser.driver.findElement(by.linkText('Get Started')).click()
I have tried many combinations than the ones listed above. Most of the times I get the error, no such element found. Any help is greatly appreciated. Have been struggling on this with no luck.
Related
Bitten off more than I can chew with this one. It's my first time trying to use AppleScript to automate Safari (while at the same time trying to figure out HTML). I've found examples to show me how to do this and have made it work for some very simple websites, but can't make it work for the website I'm trying to use.
I'm trying to navigate this website https://app.ssm.gov.mo/healthPHD/ using Automator with AppleScript commands.
On the third page in, when I go to the Safari console and input something like document.getElementById('btnSubmit').click() to submit the form, it works just fine.
However, when I add an AppleScript command in Automator as follows, it doesn't work:
tell application "Safari"
activate
tell document 1
do JavaScript "document.getElementById('btnSubmit').click();"
end tell
end tell
Also, I'm aware of the command document.forms[0].elements[0].checked=true for selecting checkboxes, but this doesn't seem to work for the checkboxes on this website as they are nested within the various Frames and Div parts. How do I go about navigating the frames and divs so as to select some of the checkboxes on this website before issuing the submit command?
Thanks.
I have a weird problem on a Wordpress wesbite that I maintain: the code fbq('track', 'ViewContent'); appears at the very bottom of several pages that use the Ninja Forms plugin, here is an example:
https://www.smashdocs.net/subscribe-now/
I know that this code is used for Facebook pixel tracking but I don't have any related code inserted in the theme templates or as a plugin.
The weird thing is that the code cannot be found in the source code of the webpage. However, it can be seen when using the browser's element inspector.
The code appears only on pages where a Ninja Form is used - no other pages on the website have this problem. I tested all settings of Ninja Forms and could not find anything that has an effect on this.
I've searched on the web for this problem but could not find any help. Has anyone encountered a similar issue? I'll greatly appreciate any help on this topic.
I don't understand what's going on - used several different contact form plugins and it's the same problem every time. Whenever the form is filled out and I click submit, the page acts all jittery and freezey and then keeps popping back to the top. Anyone have any advice on how to troubleshoot this problem? Don't really know how to debug and such....
http://www.adivineweddingmadeeasy.com/contact/
I spent a minute looking at it but have not found a definitive answer yet, but it seems like something is up with your form control, particularly as it is defined within each field. I was able to get the form to behave when removing all of the wcpf7 form control classes. Then again, simply removing them would not fix your problem because the form would not function as designed.
In case you want to try checking it out yourself, try right-clicking and selecting 'inspect element' or 'inspect' from the drop down menu. It won't mean much to you unless you understand HTML but it is a start in terms of troubleshooting.
You easiest solution is trying a different form application to see if it works.
In one of my projects i need to open my webpage(.aspx or .asp) in a popup dialogue box from a windows application.
i tried window.open(), but certainly its not giving me the desired output.
can anyone help me??
You're not giving us a lot of information (e.g., C#?, vb.net?, any contextual code relevant to the issue), but as sort of an all-purpose solution to this, you may want to consider using javascript to open the window. You can even run it from server-side by registering the script. I'd provide you with code, but I don't know what language you are using.
I am using Cyclone Slider 2 on the following page: http://alexistmyers.com/test/ I have 2 slides in this slider, but it's only showing one, basically it's not cycling as it should. I have the settings set to automatically cycle through and in the admin section of the plugin it shows as cycling through, accept it won't do so on the actual page.
The weird part about this is, I used this exact same slider in another website I just created and it works perfectly. You can see it in action here: http://www.24hrbookkeeper.com/
I went to the forum for this plugin and they mentioned to go to Tools -> Web Developer -> Error Console in Firefox (I'm using Firefox to make these changes). I did that, but I did not see "Error Console", instead I see "Web Console" so I clicked on that, and this is what I see...
[20:54:27.874] "[cycle] terminating; zero elements found by selector"
This must mean something's wrong. Any ideas what this means and how to get this slider to work correctly on the first site I mentioned above? Any help you can give will be greatly appreciated!
Sounds like a conflict with another plugin but here are three things you can try:
Deactivate all plugins and reactivate them one by one.
Check that the plugin was properly installed and activated.
Check the link to the image in your media library and test with another image.